Welcome to Centmin Mod Community
Become a Member

Wordpress Disable Cache In Sub-Directory

Discussion in 'Blogs & CMS usage' started by JamesJamz, May 21, 2021.

  1. JamesJamz

    JamesJamz New Member

    10
    2
    3
    May 4, 2020
    Ratings:
    +3
    Local Time:
    9:32 AM
    Is there a way to disable the opcache/memcache/nginx cache in a certain sub-directory?

    I have installed a Wordpress instance using option 22, and have a sub folder in the root that runs a few different cron scripts via a URL run, but it seems these keep getting cached on the server.

    Had a look under wpffcp.conf and tried adding in

    Code:
    # avoid cache serve of orderwise"
    if ( $uri ~ "/orderwise" ) {
        set $memcached_request 0;
    }
    But that doesn't seem to work either.

     
  2. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:32 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    just pass the Wordpress wordpress_logged_in cookie in your cronjob to bypass Centmin Mod setup page caching i.e. for wp-cron.php would be

    Code (Text):
    curl -4 -skD - -H "Cookie: wordpress_logged_in" "https://yourdomain.com/wp-cron.php?doing_wp_cron" -o /dev/null 2>&1