In your functions.php check for the existence of and then re-define one or more of these constants:
W3TC_CACHE_DIR
defaults to: WP_CONTENT_DIR . ‘/cache’
W3TC_CONFIG_DIR
defaults to: WP_CONTENT_DIR . ‘/w3tc-config’
W3TC_CACHE_CONFIG_DIR
defaults to: W3TC_CACHE_DIR . ‘/config’
W3TC_CACHE_MINIFY_DIR
defaults to: W3TC_CACHE_DIR . ‘/minify’
W3TC_CACHE_PAGE_ENHANCED_DIR
defaults to: W3TC_CACHE_DIR . ‘/page_enhanced’
W3TC_CACHE_TMP_DIR
defaults to: W3TC_CACHE_DIR . ‘/tmp’
Cheers
Kimberly
Which file functions.php do you mean?
OK founded.
The right place is in the wp-content/plugins/w3-total-cache/inc/define.php file.
Find and add a new folder (wherever you want):
defined('WP_CONTENT_DIR') || define('WP_CONTENT_DIR', realpath(W3TC_DIR . '/../../MY-NEW-FOLDER'));
or like I did (so that al these files are in the uploads folder)
defined('WP_CONTENT_DIR') || define('WP_CONTENT_DIR', realpath(W3TC_DIR . '/../../uploads'));
Tested and it’s ok.
😉
Great! The reason i didnt mention the direct w3tc file: “define.php” specifically is because if/when W3TC gets updates you will lose your changes entirely (it will restore to its default directories). By making these modifications in your functions.php file (located in your theme’s folder) this will retain your changes across future updates. It’s your choice though. Both ways works fine — one is permanent.