[Plugin: WP Super Cache] Super-Cache disabling upon each new deployment (with symlinked cache dir)
-
My WordPress site is server out of
/var/www/site/current
, where “current” is a symlink to/var/www/site/releases/timestamp
. (Yes, I’m using Capistrano to deploy WordPress).On each deployment, following code being exported to the site, I automatically symlink the
uploads
andcache
directories to their appropriate place inwp-content
, and then I copy the correctwp-advanced-cache.php
towp-content
, as if it were a fresh install.However: every time I deploy, WP Super Cache disables itself. It appears to be trying to write out to
/var/www/releases/oldtimestamp/wp-content/cache
, rather than/var/www/current/wp-content/cache
.The moment I click “enable”, everything works fine again – but it means that every time I deploy new code, I have to manually go and enable Super Cache. Is this because of the symlinked structure and the use of
ABSPATH
in the code? What do you recommend for this?I’ve also run into this problem with non-symlinked code, when I rsync up files to a WordPress directory, and WP Super Cache disables itself as a result. Why is this, and what’s the best practice for avoiding this?
- The topic ‘[Plugin: WP Super Cache] Super-Cache disabling upon each new deployment (with symlinked cache dir)’ is closed to new replies.