Title: define(&#8216;AUTOPTIMIZE_CACHE_CHILD_DIR&#8217;,&#8217;/css/&#8217;);
Last modified: November 11, 2023

---

# define(‘AUTOPTIMIZE_CACHE_CHILD_DIR’,’/css/’);

 *  Resolved [bique](https://wordpress.org/support/users/bique/)
 * (@bique)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/)
 * hello
 * I have put this code in the last line of my functions.php
 *     ```wp-block-code
       define('AUTOPTIMIZE_CACHE_CHILD_DIR','/css/');
       define('AUTOPTIMIZE_CACHEFILE_PREFIX','css_');
       ```
   
 * and although it is saving the cache files in /css/ folder and with “css_” name,
   Autoptimize is still generating the files on the default folder and name and 
   getting these files anyway
 * > [View post on imgur.com](https://imgur.com/L4PhFNN)
 * how can I solve this problem?

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193475)
 * those lines should be in wp-config.php [@bique](https://wordpress.org/support/users/bique/),
   not in your theme’s functions.php.
 * hope this helps,
    frank
 *  Thread Starter [bique](https://wordpress.org/support/users/bique/)
 * (@bique)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193477)
 * sorry, my mistake. it’s in wp-config.php yes, not in functions.php
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193480)
 * likely because you added it in the last place, you’ll have to add it higher up
   🙂
 *  Thread Starter [bique](https://wordpress.org/support/users/bique/)
 * (@bique)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193486)
 * Where should i put it then?
 * > [View post on imgur.com](https://imgur.com/AANBY0y)
 *  Thread Starter [bique](https://wordpress.org/support/users/bique/)
 * (@bique)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193487)
 * it workde,I put just after /* Add any custom values between this line and the“
   stop editing” line. */
 * thank you. solved
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193488)
 * indeed 🙂
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193505)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂

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

The topic ‘define(‘AUTOPTIMIZE_CACHE_CHILD_DIR’,’/css/’);’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/defineautoptimize_cache_child_dir-css/#post-17193505)
 * Status: resolved