Change Directory
-
My server (Pantheon) does not allow writing to any directory other than wp-content/uploads for security reasons. Is it possible to move my cache directory into wp-content/uploads?
Per this FAQ it sounds like I can but I also suspect this is an outdated or different solution.
Can I change the directory & filename of cached autoptimize files?
Yes, if you want to serve files from e.g. /wp-content/resources/aggregated_12345.css instead of the default /wp-content/cache/autoptimize/autoptimize_12345.css, then add this to wp-config.php:define('AUTOPTIMIZE_CACHE_CHILD_DIR','/resources/'); define('AUTOPTIMIZE_CACHEFILE_PREFIX','aggregated_');
I added these two lines to the end of my wp-config.php file using /uploads/ instead of /resources/ but it did not work. I assume this does not actually move the directory.
Pantheon suggested I set-up a symlink (https://pantheon.io/docs/articles/sites/files/non-standard-files-locations/) using Git but this is getting beyond my technical level. I am not a developer. Any help moving the cache directory to a sub-directory of uploads is much appreciated.
- The topic ‘Change Directory’ is closed to new replies.