Welcome to Centmin Mod Community
Register Now

Wordpress Redis not working properly

Discussion in 'Blogs & CMS usage' started by zkylizer, Apr 16, 2020.

  1. zkylizer

    zkylizer New Member

    16
    0
    1
    Jun 5, 2019
    Ratings:
    +2
    Local Time:
    2:32 PM
    1.17.0
    MariaDB 10
    • Case 1
    • Case 2
    • Case 3

     
  2. eva2000

    eva2000 Administrator Staff Member

    49,037
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,487
    Local Time:
    5:32 PM
    Nginx 1.21.x
    MariaDB 10.x
    Are these subdirectory wordpress installs like domain.com/wordpress or top level domain.com wordpress installs ?

    With the rediscache_domainA.com.conf include file, I take it you opted to install wordpress via centmin.sh menu option 22 with redis nginx level cache method outlined at Wordpress - Differences between Wordpress regular install vs centmin.sh menu option 22 install ?

    the 3 cache methods outlined at Wordpress - Differences between Wordpress regular install vs centmin.sh menu option 22 install are guest full page HTML cache methods which are what wp-rocket partially does for caching. So you can't have them both enabled. If you use wp-rocket wp plugin for caching, you'd probably need to disable centmin mod's configured redis nginx level caching. I posted a how to remove Redis Nginx level cache sticky guide at Wordpress - How to remove Redis Nginx level caching from centmin.sh menu option 22 wordpress installs

    centmin mod redis nginx level cache setup at centmin.sh run time will prompt ask you if you want to disable mobile device caching. It has this option as mobile caching may not work for your wordpress themes and cause issues.
    Code (Text):
    Using full static page caching may cause problems for mobile & tablet device
    visitors depending on your WP themes used so you may want to exclude those
    
    Do you want to exclude mobile/tablet devices from full page caching ? [y/n]: 
    

    Did you answer yes to disable or no to keep mobile device caching ?

    Also centmin mod redis nginx level cache auto installs and configures nginx-helper plugin to purge redis cache. If you disable nginx-helper plugin, you won't be able to purge redis cache. If you didn't configure nginx-helper after install as instructed at end of centmin.sh menu option 22 wordpress install you would of seen the text
    Code (Text):
    ------------------------------------------------------------
    To complete setup:
      1. Enable Permalinks (DO NOT use links with .html extensions for performance reasons) i.e. /%post_id%/%postname%/
      2. Settings Menu > Nginx Helper Enable Purging set Caching Method to Redis Cache, & set Purging Conditions
      3. Settings Menu > CDN Enabler and set CDN up or disable plugin
      4. Appearance > Theme Options (Responsive theme) > Home Page nav bar > Uncheck Overrides Wordpress front page option
    

    next redis object cache has been known to cause wp-admin side stale responses after you change wordpress admin settings so usually it's not installed
     
  3. zkylizer

    zkylizer New Member

    16
    0
    1
    Jun 5, 2019
    Ratings:
    +2
    Local Time:
    2:32 PM
    1.17.0
    MariaDB 10
    Oh sorry, totally it's my fault

    After uncomment this, it's working normal now.
    #if ($redis_device = mobile) { set $skip_cache 1; }
     
  4. eva2000

    eva2000 Administrator Staff Member

    49,037
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,487
    Local Time:
    5:32 PM
    Nginx 1.21.x
    MariaDB 10.x
    Ah i see just make sure if you're caching mobile devices, that it works on both desktop and mobile as there is only 1 cache version which has to work with both mobile and desktop