Title: Relocating cache folder
Last modified: August 24, 2016

---

# Relocating cache folder

 *  Resolved [ecdltf](https://wordpress.org/support/users/ecdltf/)
 * (@ecdltf)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/relocating-cache-folder/)
 * According to the [FAQ](https://wordpress.org/plugins/autoptimize/faq/), I copied
   my AO cache folder to wp-content/cache-autoptimize and redefined the location
   in my wp-config.php with `define('AUTOPTIMIZE_CACHE_CHILD_DIR','/cache-autoptimize/');`.
 * However, it still writes to the old directory. What do I have to do exactly?

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

 *  Thread Starter [ecdltf](https://wordpress.org/support/users/ecdltf/)
 * (@ecdltf)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/relocating-cache-folder/#post-6127202)
 * It works now!
 * Initially I had placed the line in wp-config at the very end. Now I moved it 
   a bit upwards, inbetween `$table_prefix` and `define('WP_DEBUG', false);`
 * Was this really the reason?
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/relocating-cache-folder/#post-6127255)
 * yeah, I think I read somewhere that constants in wp-config.php have to be defined
   pretty early, that probably was the reason. glad it works 🙂

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

The topic ‘Relocating cache folder’ 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/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [config](https://wordpress.org/support/topic-tag/config/)
 * [folder](https://wordpress.org/support/topic-tag/folder/)
 * [relocate](https://wordpress.org/support/topic-tag/relocate/)

 * 2 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/relocating-cache-folder/#post-6127255)
 * Status: resolved