Title: Custom folder for cache not working
Last modified: October 22, 2016

---

# Custom folder for cache not working

 *  [joepske83](https://wordpress.org/support/users/joepske83/)
 * (@joepske83)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/custom-folder-for-cache-not-working/)
 * Because of the fact we don’t want any reference to wordpress we want to be able
   to use a custom folder for caching, but it does not seem to be working.
 * We use this:
    define(‘W3TC_CACHE_DIR’,ABSPATH . ‘assets/cache’);
 * in wp-config.php
 * Folders are created (minify and page_enhanced), but nothing is being written 
   into and the page shows a non css version when loading.
    Removing the rule makes
   it all work, so it’s not a problem with the server or writing rights or whatsoever.
 * Thanks in advance for checking,
    Regards Joep

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

 *  [Scott Hartley](https://wordpress.org/support/users/destac/)
 * (@destac)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/custom-folder-for-cache-not-working/#post-8343375)
 * Did this work properly in an earlier version or are you just trying this in the
   latest version?
 *  [Kimberly](https://wordpress.org/support/users/amiga500/)
 * (@amiga500)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/custom-folder-for-cache-not-working/#post-8344777)
 * [@destac](https://wordpress.org/support/users/destac/), it works in the previous
   version and although i don’t use the new version it prolly works there too.
 * [@joepske83](https://wordpress.org/support/users/joepske83/), make sure you place
   your line before _require\_once(ABSPATH . ‘wp-settings.php’);_ but after _define(‘
   ABSPATH’, dirname(\_\_FILE\_\_) . ‘/’);_
 * So in your case, inside _wp-config.php_, it would look like this:
 *     ```
       /** Absolute path to the WordPress directory. */
       if ( !defined('ABSPATH') )
       	define('ABSPATH', dirname(__FILE__) . '/');
   
       define(‘W3TC_CACHE_DIR’,ABSPATH . ‘assets/cache’);
   
       /** Sets up WordPress vars and included files. */
       require_once(ABSPATH . 'wp-settings.php');
       ```
   
 * If it still doesn’t work then this would seem to indicate that this option no
   longer works for 0.9.5+. For 0.9.4.x it still works.
 * Cheers,
    Kimberly
    -  This reply was modified 9 years, 7 months ago by [Kimberly](https://wordpress.org/support/users/amiga500/).
    -  This reply was modified 9 years, 7 months ago by [Kimberly](https://wordpress.org/support/users/amiga500/).

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

The topic ‘Custom folder for cache not working’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Kimberly](https://wordpress.org/support/users/amiga500/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/custom-folder-for-cache-not-working/#post-8344777)
 * Status: not resolved