Discover Centmin Mod today
Register Now

Confused about option 22 and redis

Discussion in 'Blogs & CMS usage' started by Jay Chen, May 24, 2018.

  1. Jay Chen

    Jay Chen Active Member

    101
    32
    28
    Sep 10, 2017
    Ratings:
    +56
    Local Time:
    4:53 AM
    I installed wordpress and redis via option22 and I also have nginx helper installed.

    So nginx helper is for full page cache and if I want object cache, I will have to install a redis object cache plugin right?

    Is there a way to disable redis full page cache?

    Thanks.
     
    Last edited: May 24, 2018
  2. eva2000

    eva2000 Administrator Staff Member

    41,748
    9,398
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,443
    Local Time:
    6:53 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yes .. but i'd avoid redis object cache as it messages with wp admin related settings updates from user reports unless you want to be flushing redis cache after every wp admin config adjustment/updates

    not advisable as that's where the whole performance is really - redis object cache doesn't do much at all for performance.
     
  3. Jay Chen

    Jay Chen Active Member

    101
    32
    28
    Sep 10, 2017
    Ratings:
    +56
    Local Time:
    4:53 AM
    If it is just wp admin configuration, then I am ok with it, I barely change those setting after the initial setup.


    I want to disable full page cache to compare the performance against cache enabler plugin.
    I thought it is as simple as running the command
    Code:
    service redis stop
    then
    Code:
    service redis start
    to start it again.
    I will have to try it out when I am able to ssh into my server again.
     
  4. eva2000

    eva2000 Administrator Staff Member

    41,748
    9,398
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,443
    Local Time:
    6:53 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    You'll have to manually remove and/or comment out the redis related entries in your domain nginx vhost file either or both domain.com.conf or domain.com.ssl.conf in /usr/local/nginx/conf/conf.d.

    If switching to other offered caching via centmin.sh menu option 22 i.e. wp supercache or recommended keycdn cache enabler. Easiest way is to run a tests dummy domain run of centmin.sh menu option 22 with your desired alternative caching from centmin.sh menu option 22 i.e. for testdummy.domain.com and then inspect that testdummy.domain.com.conf and/or testdummy.domain.com.ssl.conf entries and see what needs change in your live domain.com.conf or domain.com.ssl.conf.

    If it's test site with no data just removing entire vhost and site is an option too. To properly remove an Nginx vhost the instructions are on official site at How to delete Nginx vhost account for existing domain/subdomain ? as well as on each Nginx vhost creation's ending output too lists the commands.

    You also get a log file for each Nginx vhost created which also lists the commands in 123.09beta01 and higher example for http2.domain.com remove log at /root/centminlogs/centminmod_140218-021218_nginx_addvhost_nv-remove-cmds-http2.domain.com.log
    Code (Text):
    ls -lahrt /root/centminlogs/ | grep remove
    -rw-r--r--   1 root root 1.3K Feb 14 02:12 centminmod_140218-021218_nginx_addvhost_nv-remove-cmds-http2.domain.com.log
    


    If it's none of the above so not test site so need to keep and just remove/commenting out redis caching, then you'll need to remove redis related entries in your vhost. So for example redis cached wordpress via centmin.sh menu option 22 means removing or commenting from your nginx vhost the following lines.

    Example domain is testredis.domain.com with entries commented out
    Code (Text):
    #  include /usr/local/nginx/conf/wpincludes/testredis.domain.com/rediscache_testredis.domain.com.conf;
    

    every reference to include /usr/local/nginx/conf/php-rediscache.conf commented out and replaced with default
    Code (Text):
    #include /usr/local/nginx/conf/php-rediscache.conf;
    include /usr/local/nginx/conf/php.conf;
    

    Then test nginx conf and restart nginx and php-fpm
    Code (Text):
    nginx -t
    nprestart
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    41,748
    9,398
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,443
    Local Time:
    6:53 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  6. Jay Chen

    Jay Chen Active Member

    101
    32
    28
    Sep 10, 2017
    Ratings:
    +56
    Local Time:
    4:53 AM
    Got it, thank you very much.
    I have a lot of load tests to do this weekend.