• I installed Cache Enabler using Composer on my local development environment which is Bedrock WordPress on Laravel Valet on a Mac OSX High Sierra (https://roots.io/bedrock/).

    All looks OK (I enable WP_CACHE=true etc), and there are no error messages displayed. However caching is not working according to the test described here:

    https://www.keycdn.com/support/wordpress-cache-enabler-plugin/#check-cache-enabler-works

    The advanced-cache.php file is copied correctly to my Bedrock content dir which is <PUBLIC_HTML>/web/app in Bedrock.

    However, there is no directory in WP_CONTENT_DIR/cache/cache-enabler as defined in this line in cache-enabler.php:

    define('CE_CACHE_DIR', WP_CONTENT_DIR. '/cache/cache-enabler');

    Bedrock has a non-standard WordPress directory structure, but it sets WP_CONTENT_DIR correctly – here is the Bedrock directory structure:

    https://roots.io/bedrock/docs/folder-structure/

    There were no directory creation error messages displayed on installation of Cache Enabler.

    Could it be a file permissions problem, should I change the location of the cache-enabler directory, or how can I investigate further?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Did you try building the cache as well (i.e. logging out of your site or using incognito to visit your page)? The cache/cache-enabler directory will only be created once a cached file is present.

    Thread Starter Henry Scullion

    (@henscu)

    Thanks, @codyarsenault, that worked! Why did I need to use Incognito mode to kickstart the cache?

    In terms of checking that it was working, I was able to detect the line Cache Enabler by KeyCDN @ 22.03.2018 14:17:24 (html) in my HTML using Chrome Source Code Inspector.

    I updated my wp-config.php (WP_CACHE=true) manually (there was no error message indicating the cache-enabler couldn’t update it) and advanced-cache.php was created in my WP-CONTENT directory.

    However, I couldn’t figure out how to check that X-Cache-Handler: wp header is shown…

    But overall, my page response time is down from over 3 seconds to 0.7 seconds. Good result!

    You were likely logged in which is why Cache Enabler wasn’t working. It only generates and delivers cache to logged out users.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP_CONTENT_DIR/cache/cache-enabler dir not being created’ is closed to new replies.