Path configuration for WP Super Cache

WP Super Cache is popular plugin for caching on CMS WordPress. When you transfer the website or change hosting this plugin might cease to work. In administration you can see following error message:

Warning! WP Super Cache caching broken! The script advanced-cache.php could not load wp-cache-phase1.php.

and after the message follows path to the directory where the plugin is located.

You can solve this problem by editing this path. It is usually located in configuration file wp-config.php. Before you start editing this file make a copy for backup first to be able to change back the settings if needed.

Search in the file for the following lines:

define('WP_CACHE', true);
define( 'WPCACHEHOME', '/nfsmnt/hosting2_2/0/8/088acd36-b893-4c4e-8ee6-2f2b4622e8fe/websupport.sk/web/wp-content/plugins/wp-super-cache/' );

edit definition of WPCACHEHOME to

define('WPCACHEHOME', dirname(__FILE__) . '/wp-content/plugins/wp-super-cache/');

You can verify that the caching is working by error message that disappears from administration or in the list of cached files under Settings > WP Super Cache > Contents > List all cached files.

Updated on March 24, 2021

Was this article helpful?

Related Articles