Title: Well-Supported Plugin with Plenty of Options
Last modified: November 30, 2016

---

# Well-Supported Plugin with Plenty of Options

 *  [douglaskarr](https://wordpress.org/support/users/douglaskarr/)
 * (@douglaskarr)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/)
 * This is a fantastic plugin, but the cache folder isn’t in the uploads folder 
   so some secure hosts disable the ability to write. Currently, the folder is in/
   wp-content/cache/autoptimize but should be moved to /wp-content/uploads/cache/
   autoptimize
    -  This topic was modified 9 years, 7 months ago by [douglaskarr](https://wordpress.org/support/users/douglaskarr/).

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8475973)
 * Morning Douglas;
    As per the FAQ you can change where AO writes the cache:
 * > **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_');
   >     ```
   > 
 * hope this helps,
    frank
 *  Thread Starter [douglaskarr](https://wordpress.org/support/users/douglaskarr/)
 * (@douglaskarr)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8482368)
 * Many thanks!
 *  Thread Starter [douglaskarr](https://wordpress.org/support/users/douglaskarr/)
 * (@douglaskarr)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8495359)
 * [@futtta](https://wordpress.org/support/users/futtta/)
 * I attempted to change the directory per the wp-config.php as you mentioned but
   it didn’t do anything:
    `define('AUTOPTIMIZE_CACHE_CHILD_DIR', ABSPATH.UPLOADS.'/
   cache/autoptimize/');`
 * Still results in the cache folder defined in **Cache Info**:
    `/wp-content/cache/
   autoptimize/`
 * Any ideas?
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496193)
 * hmmm, 2 things;
    * i vaguely remember the place where you add the code in wp-
   config.php is important, try moving the define around? * try with a hardcoded
   path first (`'wp-content/uploads/'` instead of `ABSPATH.UPLOADS`)?
 * frank
 *  Thread Starter [douglaskarr](https://wordpress.org/support/users/douglaskarr/)
 * (@douglaskarr)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496241)
 * [@futtta](https://wordpress.org/support/users/futtta/) yes, that was it! It appears
   that AUTOPTIMIZE_CACHE_CHILD_DIR includes the wp-content folder; as a result,
   I was able to set the directory with:
    `define('AUTOPTIMIZE_CACHE_CHILD_DIR','/
   uploads/cache/autoptimize/');`
 * And that line of code must be inserted prior to:
    `require_once(ABSPATH . 'wp-
   settings.php');`
 * Thanks again for the assistance!
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496281)
 * you’re welcome Douglas 🙂
 *  Thread Starter [douglaskarr](https://wordpress.org/support/users/douglaskarr/)
 * (@douglaskarr)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496307)
 * My client is using Pantheon, a really nice development and hosting platform for
   WordPress. Unfortunately, while these edits worked… cache files with a .php extension
   are locked and not executed by the server.
 * Is there any means of changing the extensions of these files to .js or .css respectively?
 * Thanks!
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496330)
 * tick the very last option, “Save aggregated script/css as static files?” and 
   AO will switch to .js and .css Douglas.
 *  Thread Starter [douglaskarr](https://wordpress.org/support/users/douglaskarr/)
 * (@douglaskarr)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496342)
 * I owe you a coffee (and then some!)
 *  Thread Starter [douglaskarr](https://wordpress.org/support/users/douglaskarr/)
 * (@douglaskarr)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496346)
 * Updated to 5 stars, very appreciative!
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496463)
 * thanks, have yourself a nice day (or night in your timezone now) Douglas!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Well-Supported Plugin with Plenty of Options’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/need-to-move-cache-folder/#post-8496463)