Learn about Centmin Mod LEMP Stack today
Become a Member

Master Branch update centmin.sh menu option 22 wordpress routine in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jun 6, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    59,404
    12,517
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,153
    Local Time:
    9:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    update centmin.sh menu option 22 wordpress routine in 123.09beta01


    Add /wp-json requests exclusion from respective full page caching for keycdn cache enabler, redis nginx level cache and wp super cache methods for their respective $request_uri exclusion lines in their respective auto created include files which are as follows where ${vhostname} is your domain name for wordpress install. This will skip caching /wp-json requests for new centmin.sh menu option 22 wordpress installs which have this updated code. Existing wordpress installs will need to manually make the relevant changes below as to not overwrite any changes in existing wordpress custom installs which may break the wordpress sites.

    - for keycdn cache enabler at /usr/local/nginx/conf/wpincludes/${vhostname}/wpcacheenabler_${vhostname}.conf relevant updated line now looks like
    Code (Text):
        if ($request_uri ~* "(\?add-to-cart=|/cart/|/my-account/|/checkout/|/shop/checkout/|/wp-json/|/store/checkout/|/customer-dashboard/|/addons/|/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
            set $cache_uri 'nullcache';
        }
    


    - for redis at /usr/local/nginx/conf/wpincludes/${vhostname}/rediscache_${vhostname}.conf relevant updated line now looks like
    Code (Text):
    if ($request_uri ~* "\?add-to-cart=|/cart/|/my-account/|/checkout/|/shop/checkout/|/wp-json/|/store/checkout/|/customer-dashboard/|/addons/|/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
      set $skip_cache 1;
    }
    


    - for wp super cache at /usr/local/nginx/conf/wpincludes/${vhostname}/wpsupercache_${vhostname}.conf relevant updated line now looks like
    Code (Text):
    if ($request_uri ~* "/(\?add-to-cart=|cart/|my-account/|checkout/|shop/checkout/|store/checkout/|wp-json/|customer-dashboard/|addons/|wp-admin/.*|xmlrpc\.php|wp-.*\.php|index\.php|feed/|sitemap(_index)?\.xml|[a-z0-9_-]+-sitemap([0-9]+)?\.xml)") { set $cache_uri 'null cache'; }
    


    Continue reading...

    Centmin Mod Github Master branch

    Master branch is where most recent commits are made as at May 24, 2015.