Learn about Centmin Mod LEMP Stack today
Become a Member

Cache-Enabler Plugin Cache is not created or served

Discussion in 'Blogs & CMS usage' started by Chuong Luong, Oct 14, 2020.

  1. eva2000

    eva2000 Administrator Staff Member

    47,498
    10,769
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,742
    Local Time:
    1:05 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    You'd only need to downgrade Cache Enabler. I am looking into the process for this right now. As well as trying to convince Cache Enabler developers to either go back to 1.4.9 method or offer a choice of 1.4.9 method of query string inclusion in cache or 1.5.1 method of query string exclusion in cache at Query string cache policy · Issue #148 · keycdn/cache-enabler

     
  2. eva2000

    eva2000 Administrator Staff Member

    47,498
    10,769
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,742
    Local Time:
    1:05 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    @Chuong Luong try these SSH commands to downgrade to Cache Enabler 1.4.9 and install a plugin = block-specific-plugin-updates from Block Plugin Update to block Cache Enabler updates to 1.5.1 for now

    replace yourdomain.com in domain variable with your Wordpress domain
    Code (Text):
    domain=yourdomain.com
    wp plugin deactivate cache-enabler --allow-root --path=/home/nginx/domains/$domain/public
    wp plugin uninstall cache-enabler --allow-root --path=/home/nginx/domains/$domain/public
    wp plugin install cache-enabler --version=1.4.9 --force --activate --allow-root --path=/home/nginx/domains/$domain/public
    nprestart
    
    wp option update cache-enabler '{"expires":6,"clear_on_upgrade":1,"new_post":1,"new_comment":1,"update_product_stock":0,"webp":0,"compress":1,"excl_ids":"","excl_paths":"","excl_cookies":"","incl_parameters":"","minify_html":0}' --format=json --allow-root --path=/home/nginx/domains/$domain/public
    
    wp option patch update cache-enabler incl_parameters '/^fbclid|ref|mc_(cid|eid)|utm_(source|medium|campaign|term|content|expid)|gclid|fb_(action_ids|action_types|source)|age-verified|ao_noptimize|usqp|cn-reloaded|_ga|_ke$/' --allow-root --path=/home/nginx/domains/$domain/public
    
    wp option pluck cache-enabler incl_parameters --format=json --allow-root --path=/home/nginx/domains/$domain/public
    
    wp option get cache-enabler --format=json --path=/home/nginx/domains/$domain/public/ | jq
    
    wp plugin install block-specific-plugin-updates --activate --allow-root --path=/home/nginx/domains/$domain/public
    
    if [ "$(\wp option get bpu_update_blocked_plugins --allow-root --path=/home/nginx/domains/$domain/public >/dev/null 2>&1; echo $?)" -ne '0' ]; then wp option update bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; else wp option add bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; fi
    
    nprestart
    

    and also
    Code (Text):
    domain=yourdomain.com
    chown -R nginx:nginx /home/nginx/domains/$domain/public
    
     
    Last edited: Oct 15, 2020
  3. Chuong Luong

    Chuong Luong Member

    34
    1
    8
    Aug 8, 2019
    Ratings:
    +3
    Local Time:
    10:05 AM
    My goodness, thanks for your help! The cache is working again! :D

    I run this:

    PHP:
    if [ $(wp option get bpu_update_blocked_plugins) ]; then wp option update bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; else wp option add bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; fi
    I get this:

    PHP:
    ErrorThis does not seem to be a WordPress installation.
    Pass --path=`path/to/wordpress` or run `wp core download`.
    SuccessAdded 'bpu_update_blocked_plugins' option.
    Is it successfull?
     
  4. eva2000

    eva2000 Administrator Staff Member

    47,498
    10,769
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,742
    Local Time:
    1:05 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Good to hear :)

    Did you run that command in same SSH session as when you ran domain=yourdomain.com to populate your domain variable ?

    what if you run
    Code (Text):
    domain=yourdomain.com
    if [ $(wp option get bpu_update_blocked_plugins) ]; then wp option update bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; else wp option add bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; fi
    

    you can check the setting via
    Code (Text):
    domain=yourdomain.com
    wp option get bpu_update_blocked_plugins --allow-root --path=/home/nginx/domains/$domain/public
    

    should return
    Code (Text):
    wp option get bpu_update_blocked_plugins --allow-root --path=/home/nginx/domains/$domain/public
    cache-enabler/cache-enabler.php
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    47,498
    10,769
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,742
    Local Time:
    1:05 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    ah i see the problem my option check was missing the path updated above post but this is correct one
    Code (Text):
    if [ "$(\wp option get bpu_update_blocked_plugins --allow-root --path=/home/nginx/domains/$domain/public >/dev/null 2>&1; echo $?)" -ne '0' ]; then wp option update bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; else wp option add bpu_update_blocked_plugins cache-enabler/cache-enabler.php --allow-root --path=/home/nginx/domains/$domain/public; fi
    
     
    Last edited: Oct 15, 2020
  6. eva2000

    eva2000 Administrator Staff Member

    47,498
    10,769
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,742
    Local Time:
    1:05 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  7. Chuong Luong

    Chuong Luong Member

    34
    1
    8
    Aug 8, 2019
    Ratings:
    +3
    Local Time:
    10:05 AM
    Yep, running your edited code, return this:

    HTML:
    Success: Value passed for 'bpu_update_blocked_plugins' option is unchanged.
    I think that's a good for now. I will need to bookmark this thread and your thread, just in case :D Thank you for your help!!

    Also, I have another question:

    I am using htop to track process. What usually see is mostly php running (CPU 3-10%), while nginx rarely run (CPU 0-0.7%) even though the cache size is a few GB already. So, does cache successfully serve to visitors? I though nginx should run most of the time.
     
  8. eva2000

    eva2000 Administrator Staff Member

    47,498
    10,769
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,742
    Local Time:
    1:05 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    something for a new thread/topic but depends cache is only for guests, logged in users won't hit cache.