• Hello,

    I changed the cache directory of the w3tc plugin by adding the code below to the wp-config.php file.

    defined('WP_CONTENT_DIR') || define('WP_CONTENT_DIR', realpath(W3TC_DIR . '/../../wtc_cache'));

    The directory is changed, but when I try to clear the page cache it isn’t working anymore. Purge the page cache automatically after updating a page/post does not work either. Does anyone know a solution to solve the problem?

    Thanks for helping me.

    Regards

    https://www.ads-software.com/plugins/w3-total-cache/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Actually, replace what you did in wp-config.php with this:

    define('W3TC_CACHE_DIR', ABSPATH.'wp-content/wtc_cache');

    But just make sure that line is placed anywhere above this existing line:

    require_once(ABSPATH . 'wp-settings.php');

    Kimberly

    Thread Starter timmen22

    (@timmen22)

    Thanks for your quick response Kimberly.

    Replacing the code solved my problem. Thanks!

    Thread Starter timmen22

    (@timmen22)

    Hi again,

    I noticed that the solution is working for the “enhanced” caching method. When I switch to the “basic” caching method purging the cache does not work.

    It would be great if anyone can resolve the problem.

    Thanks for helping me.

    Hi there. I did a test and it works for me. (i switched to “basic”). Not sure what you are doing wrong that would cause this. Would need more info.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Cache Directory’ is closed to new replies.