WordPress.org

Support

Support » Plugins and Hacks » Warning! WP Super Cache caching broken! The script advanced-cache.php could not

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

  • Hello I just tried to instal WP Super Cache and I am getting a weird warning message:

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

    Please edit /home/[our-site-folder]/public_html/[wp-content-folder-renamed]/advanced-cache.php and make sure the path to /home/[our-site-folder]/public_html/[wp-content-folder-renamed]/plugins/wp-super-cache/wp-cache-phase1.php is correct.

    The problem is, I’ve gone into this file, as instructed, and there isn’t really a “path” anywhere.

    I just see the file name of “wp-cache-phase1.php” and try to change that to a full path, but that doesn’t work.

    I’ve tried deactivating and re-activating and that also didn’t work.

    I’ve tried looking online for answers and nothing seems to be solving this issue, that I could find.

    Can you help?

    Here is the code that is in /home/[our-site-folder]/public_html/[wp-content-folder-renamed]/advanced-cache.php:

    <?php
    # WP SUPER CACHE 1.2
    function wpcache_broken_message() {
    	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
    		echo "<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->";
    }
    
    if ( false == defined( 'WPCACHEHOME' ) ) {
    	define( 'ADVANCEDCACHEPROBLEM', 1 );
    } elseif ( !include_once( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
    	if ( !@is_file( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
    		define( 'ADVANCEDCACHEPROBLEM', 1 );
    	}
    }
    if ( defined( 'ADVANCEDCACHEPROBLEM' ) )
    	register_shutdown_function( 'wpcache_broken_message' );
    ?>

    http://wordpress.org/extend/plugins/wp-super-cache/

Viewing 15 replies - 16 through 30 (of 49 total)
  • You are welcome 🙂

    Hi Hieu, I had that problem, and I have catched your advise: ” Here is my code in wp-config
    define( ‘WPCACHEHOME’, ‘PATH/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager”

    I changed the root in my folder where my WP cache is reading the data, and It was solved….Thanks

    stealingsand
    Member

    @stealingsand

    I did a clean install, and have agonized for about 4 hours on this today.

    Come to find out, in my wp-config.php file, the line

    define( 'WPCACHEHOME', 'path-on-my-site' );

    was inserted ABOVE
    <?php /**/ ?><?php

    …which makes it singularly unhelpful.

    I moved it below, above another section of code that looked similar to it (very technical, I am), and voila, now it works. WHEW. Because srsly, I’m not very good at these things.

    I resolved the problem by writing the below code in my wp-config.php file before ABSPATH is ever defined.

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

    Coolcash4live
    Participant

    @coolcash4live

    Please I am new to this coding of a thing…can you please help me @hieu.

    My site is not caching at all because of this problem.

    esmi
    Forum Moderator

    @esmi

    As per the Forum Welcome, please post your own topic. Your problem – despite any similarity in symptoms – is likely to be completely different.

    kim@steinhaug.com
    Member

    @kimsteinhaugcom

    Well I tried aøø the different ideas here, without any luck. Doesnt help adding “define(‘WPCACHEHOME’, dirname(__FILE__) . ‘/wp-content/plugins/wp-super-cache/’);” in config for me _ i still get:

    Warning! /home/111/public_html/wp-content/advanced-cache.php does not exist or cannot be updated.

    Clearly the path plugins/wp-super-cache/ is missing.

    Tanaji
    Member

    @tanajibhanvasegmailcom

    Hi,
    Thanks hieu.nguyen for your helpful information. Its work for me. Thanks again.

    I have a similar problem. Same error (“WPCACHEHOME must be set in config file.”)

    If temporarily chmod my wp-config.php to 777, I can get it to go to the next step and add the correct item to the wp-config.php file, but when I chmod wp-config.php back to non-writeable, the same error comes back.

    Jesterx93
    Member

    @jesterx93

    here is what i did .. I found this in the file wp-config.php

    /** Sets up WordPress vars and included files. */
    
    require_once(ABSPATH . 'wp-settings.php');

    then above the line:
    require_once(ABSPATH . 'wp-settings.php');

    I entered a new line:
    define('WPCACHEHOME', dirname(__FILE__) . '/wp-content/plugins/wp-super-cache/');

    so the final product looked like this:

    /** Sets up WordPress vars and included files. */
    define('WPCACHEHOME', dirname(__FILE__) . '/wp-content/plugins/wp-super-cache/');
    require_once(ABSPATH . 'wp-settings.php');

    hope this helps

    revixi5
    Participant

    @revixi5

    To me, the problem is cause by a change (by the hosting company) in the absolute path of the server. By following the instruction in the warning, I solve the problem. No need to touch the wp-config.php file.

    Open the file : /wp-content/advanced-cache.php
    Compare the absolute path written in that file with the one include in the warning message (in WordPress dashboard). The warning message is giving you the new path, use it to fix the one in the advanced-cache.php file.

    revixi5
    Participant

    @revixi5

    UPDATE :
    I found an important detail. The file “advanced-cache.php” that is located OUTSIDE the PLUGINS folder, that is to say in the WP-CONTENT folder is not updated when updating the plugin. So if you are using this plugin for a long time, it is possible that the code in this file differs from the current version (v1.2).

    In older versions (for example v0.8.9.1), the absolute path is written in it directly.

    <?php
    # WP SUPER CACHE 0.8.9.1
    function wpcache_broken_message() {
    	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
    		echo "<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->";
    }
    
    if ( !include_once( '/YOUR ABSOLUTE PATH/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
    	if ( !@is_file( '/YOUR ABSOLUTE PATH/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
    		define( 'ADVANCEDCACHEPROBLEM', 1 );
    		register_shutdown_function( 'wpcache_broken_message' );
    	}
    }
    ?>

    In the new version (v1.2), that file only contains a link to the WordPress “wp-config.php”. So it would be better to update the contents of the “advanced-cache.php” found in WP-CONTENT folder with the following:

    <?php
    # WP SUPER CACHE 1.2
    function wpcache_broken_message() {
    	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
    		echo "<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->";
    }
    
    if ( false == defined( 'WPCACHEHOME' ) ) {
    	define( 'ADVANCEDCACHEPROBLEM', 1 );
    } elseif ( !include_once( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
    	if ( !@is_file( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
    		define( 'ADVANCEDCACHEPROBLEM', 1 );
    	}
    }
    if ( defined( 'ADVANCEDCACHEPROBLEM' ) )
    	register_shutdown_function( 'wpcache_broken_message' );
    ?>

    And then you can check your “wp-config.php” file (at the root of WordPress) if it contains the absolute path of your server (the warning message usually contain the old and the new absolute path of your server). The line should be like this (with your absolute path):

    define('WPCACHEHOME', '/YOUR ABSOLUTE PATH/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager

    Hope this help.

    Markszachary
    Member

    @markszachary

    My site is down because of WP Super Cache. MY PROBLEM is that I can’t even get into wordpress at all to remove the plugin. I have tried all of your ideas and still can’t even get into wordpress. The plugin is the absolute worst ever. It has destroyed my website.

    revixi5
    Participant

    @revixi5

    Never heard of a problem that serious with that plugin… Probably in conflict with another plugin. You will have to remove it manually by FTP, or by your host file manager.

    Hi. I also get the following error message ( see below )

    I have read 3 strands about this and I don’t even BEGIN to understand how to actually fix the problem: please help:
    I know NOTHINg about code, or web design speak, I just followed a very good YouTube video that made me able to get my own web site up and running.

    I’m not an idiot, just not a web person, if you think you can guide me through this stuff in human speak, with NO presumptions I’ll understand what you mean – I’d be most grateful…I’ve listed my 2 questions below:

    Here’s the error message:

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

    Please edit /home/yngvilvg/public_html/wp-content/advanced-cache.php and make sure the path to /home/yngvilvg/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php is correct. “

    Here are my questions:
    1. where do I find ” /home/yngvilvg/public_html/wp-content/advanced-cache.php” ?

    2. What do I actually DO to “make sure the path to /home/yngvilvg/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php is correct” ?
    – I mean, how am I supposed to now what the RIGHT path is?
    (indeed what is a path, and do I really want to know?)

    I don’t understand lingo like “point to” or what constitutes a “file” in word press.
    (- is it the code that comes up when I click on a given plug-in in my plug-in manager, I bet it is…)

    I’ve learned nothing about WordPress and I’m not sure that I want to begin, but tell me what you think I should know …

    I am sure many of you guys think people like me don’t have the right to live, but please help me get back to editing my fabulous word press web site!!!

    thank you

Viewing 15 replies - 16 through 30 (of 49 total)
  • The topic ‘Warning! WP Super Cache caching broken! The script advanced-cache.php could not’ is closed to new replies.