My blog is hosted on Pagodabox and it was almost 3 months of continuous tweaking to make it fit on Pagodabox environment. Just recently I have fixed my writable directory to support most caching plugin like WP Super Cache and W3 Total Cache.
WP Super Cache
WP Super Cache is a caching plugin for WordPress. It was great for my blog and it is doing a great job. However, upgrading it on my current setup requires modifying the plugin core to move its directories due to Pagodabox read-only environment.
With my new setup, it is no more a problem.
On my old post, I used a shared writable directory at
wp-content/writable. This time, I moved the writable directory up to
wp-content directory so that whatever plugin wanted to write, it is free to do so. Below is my directory structure.
wp-admin wp-includes wp-content-ro plugins themes wp-content plugins -> ../wp-content-ro/plugins themes -> ../wp-content-ro/themes index.php
wp-content directory is moved to
wp-content-ro. On my box file, I set
wp-content as shared writable directory and on that directory, I created symlinks to plugins and themes inside.
Below is my Boxfile content:
web1: shared_writable_dirs: - /wp-content php_extensions: - eaccelerator - memcache - mysql - curl
We also need to update our
.gitignore file to add
wp-content to the ignored directory.
Thumbs.db .svn _svn *.kpf *.swp .buildpath .settings *.komodoproject /wp-content
We make sure that
wp-content directory is deleted and cleaned up then deploy that version. Once deployed, login to the shared writable directory via SSH then set the symbolic links.
cd shared/wp-content ln -s ../wp-content-ro/plugins plugins ln -s ../wp-content-ro/themes themes
What we do above is create a symbolic link in
wp-content for plugins and themes pointing to
wp-content-ro directory. Although these directories does not exists in the shared writable directory, once deployed, they will point to our
wp-content-ro directory as specified previously.
With this setup, we can install and setup WP Super Cache easily and have it create cache config and cache directories whenever it needs.