• Resolved akisp

    (@akisp)


    We installed redis cache.
    We have 2 domains
    1. alldaynews.gr
    2. newspedia.gr

    Alldaynews.gr uses database 0 (on redis)
    Newspedia.gr uses database 1 (on redis)

    After installing redis … alldaynews.gr uses redis perfectly!
    But … newspedia.gr has problems. it seems we cannot upload images (it gives error, I think it lost path… )
    We lost also frontpage. It doesn’t load almost anything.

    Plugin on both sites show that everything works right.

    a. installed plugin wp redis object
    by installing wp redis plugin some code is written ONLY on wp-config.php file at newspedia.gr:
    // change the database for each site to avoid cache collisions
    define( ‘WP_REDIS_DATABASE’, 1 );
    define( ‘WP_REDIS_HOST’, ‘127.0.0.1’ );
    define( ‘WP_REDIS_PORT’, 6379 );
    // define( ‘WP_REDIS_PASSWORD’, ‘secret’ );
    define( ‘WP_REDIS_TIMEOUT’, 1 );
    define( ‘WP_REDIS_READ_TIMEOUT’, 1 );

    php.ini file:
    `zend_extension=opcache.so
    opcache.enable=1
    opcache.enable_cli=1
    opcache.jit_buffer_size=512M
    opcache.jit=1255`
    (to enable jit)

    ALLDAYNEWS.GR – CHANGES

    after installing plugin wp-config.php has following lines:

    //define('WP_REDIS_SCHEME', 'unix');
    //define('WP_REDIS_PATH', '/home/alldayne/redis/server.sock');
    //define('WP_CACHE_KEY_SALT', 'alldayne');
    //define('WP_REDIS_MAXTTL', '10800');
    //define('WP_REDIS_METRICS_MAX_TIME', '900');

    As you can see they are commented.

    The only difference is the key prefix is added ONLY at newspedia.gr

    The page I need help with: [log in to see the link]

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

    (@tillkruess)

    Use the search before posting.

    Set a different WP_REDIS_DATABASE for each site.

    Thread Starter akisp

    (@akisp)

    But I set it as I already wrote that.

    define( ‘WP_REDIS_DATABASE’, 1 );
    (for domain 2)

    Domain 1 is using ‘database 0’.

    Both domains have the correct setup (as supposed) and this is visible at – wp redis object cache plugin’s – settings.

    After your comment, I added to domain 1 (alldaynews.gr) wp-config.php (very top) the line:

    define( ‘WP_REDIS_DATABASE’, 0 );

    Plugin Author Till Krüss

    (@tillkruess)

    Make sure to call redis-cli FLUSHALL afterwards.

    Thread Starter akisp

    (@akisp)

    did that. we still can’t work on domain 2 (newspedia.gr – database 1)

    • This reply was modified 2 years, 1 month ago by akisp.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Server hosts 2 domains – Only one is ok’ is closed to new replies.