• Resolved othqsa95

    (@othqsa95)


    hello,

    i’ll use the same container with multiple websites.

    I need to insert this code in the wp-config.php

    // adjust Redis host and port if necessary define( ‘WP_REDIS_HOST’, ‘127.0.0.1’ );define( ‘WP_REDIS_PORT’, 6379 );

    // change the prefix and database for each site to avoid cache data collisionsdefine( ‘WP_REDIS_PREFIX’, ‘my-moms-site’ );

    define( ‘WP_REDIS_DATABASE’, 0 ); // 0-15

    // reasonable connection and read+write timeoutsdefine( ‘WP_REDIS_TIMEOUT’, 1 );

    define( ‘WP_REDIS_READ_TIMEOUT’, 1 );

    Regarding this line:

    define( ‘WP_REDIS_PREFIX’, ‘my-moms-site’ );

    I just need to put the name of the website or the domainname.com ?

    Regarding this line:

    define( ‘WP_REDIS_DATABASE’, 0 ); // 0-15

    For the 1st website, I put 0, the second 1 etc… ?

    Can you confirm?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    I’d suggest not using WP_REDIS_PREFIX at all, and instead use a different WP_REDIS_DATABASE for each WordPress site.

    You could still have WP_REDIS_PREFIX as a backup to avoid data collision should two sites use the same WP_REDIS_DATABASE by accident.

Viewing 1 replies (of 1 total)

The topic ‘Redis cache / Docker’ is closed to new replies.