• Resolved CSY

    (@csyecommerce)


    Hi…

    do i also need to define a database for this to work on multiple sites? eg

    site 1
    define( ‘WP_REDIS_DATABASE’, ‘0’ );
    define( ‘WP_CACHE_KEY_SALT’, ‘site1 );
    define( ‘WP_REDIS_SELECTIVE_FLUSH’, true);

    site2
    define( ‘WP_REDIS_DATABASE’, ‘1’ );
    define( ‘WP_CACHE_KEY_SALT’, ‘site2’ );
    define( ‘WP_REDIS_SELECTIVE_FLUSH’, true);

    or will it just work without?

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

    (@tillkruess)

    Either use a separate database or a prefix and selective flush. Not both.

    Thread Starter CSY

    (@csyecommerce)

    Thanks for your reply..

    so I only need to use..
    define( ‘WP_REDIS_DATABASE’, ‘1’ ); ???

    is this the correct syntax as it still appears in wordpress admin as database 0

    I tried just using
    define( ‘WP_CACHE_KEY_SALT’, ‘site1 );
    define( ‘WP_REDIS_SELECTIVE_FLUSH’, true);

    and this causes pages and data to be shared between the 2 sites?

    Plugin Author Till Krüss

    (@tillkruess)

    Use a different database for each site.

    If it doesn’t show up, you’re adding the constant too late in the config. Move it up.

    Thread Starter CSY

    (@csyecommerce)

    ive go this on my 3rd line of wp-config define( ‘WP_REDIS_DATABASE’, ‘1’ );

    currently im just testing this with 1 site but it still gives a zero value in admin

    im using IIS server.. would this be an issue?

    Plugin Author Till Krüss

    (@tillkruess)

    I don’t know. I’d hire a developer to assist you with your environment.

    Thread Starter CSY

    (@csyecommerce)

    I managed to sort this was a syntax error from copy and pasting single acute accent

    so simple…

    define( ‘WP_REDIS_DATABASE’, ‘1’ );
    to
    define( ‘WP_REDIS_DATABASE’, ‘1’ );

    Subtle.. not easy to spot difference in above..except the top one wont work

    Thanks for your help

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multiple sites’ is closed to new replies.