Issues with hardcoded location to zencache.php
-
The hardcoded, absolute path to zencache.php in the variable
ZENCACHE_PLUGIN_FILE
will cause issues when working with different servers (local dev vs remote staging, production etc) and migrating your site between those.Line 164 (in my case) in the file
advanced-cache.php
:
define('ZENCACHE_PLUGIN_FILE', '/Volumes/HD/local/path/follows/here/plugins/zencache/zencache.php');
Screenshot of debug output (FYI: the issue will actually also break functionality on some pages)
I solved this by replacing the first part of this static path by the constant
WP_CONTENT_DIR
which is already defined inwp-config.php
. I think this is best practice for every plugin, isn’t it? Screenshot of change in codeHowever, I don’t know if, and how, this can make it back in your original code in some way so I won’t run into trouble again after future updates.
Please let me know if you need more info.
- The topic ‘Issues with hardcoded location to zencache.php’ is closed to new replies.