WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » please update WPCACHEHOME path to something more dynamic

please update WPCACHEHOME path to something more dynamic

  • Hi,

    We run Worpit.com / WorpDrive backup and we’re seeing users who use WP Super Cache, so that when they restore their site, they get PHP include errors because the WPCACHEHOME value is a static value added to the wp-config.

    If you move this site to another server, this value is broken immediately.

    Instead, you could use a relative path, such as:

    define( 'WPCACHEHOME', __FILE__.'/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager

    Or even better, would be to use the WordPress constant: WP_CONTENT_DIR, or the other WordPress constant ABS_PATH.

    Anything else would do, because hard-coding the path causes problems.

    We would be very grateful if you could update your plugin to support relative paths.

    Many thanks!
    Paul.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Great post.. I agree they should. I am very new to wordpress and just by moving my files over to a sub-domain I got errors.

    Thanks for the post because I did not know where WPCACHEHOME was defined.

    And again they should make it more dynamic eliminating unwanted issues like the one I encountered..

    Paul G. I feel like kissing you right now, I’ve spent the better part of 3 days trying to figure out why my WordPress restore didn’t work, and you’ve pretty much fixed my biggest issue and from there I could work the rest of my errors out!

    So a massive THANK YOU! 🙂

    I’ve got one last question for you though, since I’m not a WordPress genius, only a beginner, I was wondering if perhaps you’d know why I’m getting the following error once I’m logged into my site:

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

    Please edit C:\xampp\htdocs\wordpress352/wp-content/advanced-cache.php and make sure the path to C:\xampp\htdocs\wordpress352\wp-config.php/wp-content/plugins/wp-super-cache/wp-cache-phase1.php is correct.

    Any ideas would be great!

    Paul G.

    @paultgoodchild

    Is this on a live site, or local site?

    It’s local

    Paul G.

    @paultgoodchild

    Okay, it says to edit this file:
    C:\xampp\htdocs\wordpress352/wp-content/advanced-cache.php

    because the path is wrong. It is wrong, because you have “wp-config.php” in there.
    Remove that from:
    C:\xampp\htdocs\wordpress352\wp-config.php/wp-content/plugins/wp-super-cache/wp-cache-phase1.php

    and make it:
    C:\xampp\htdocs\wordpress352/wp-content/plugins/wp-super-cache/wp-cache-phase1.php

    hope that helps.
    Paul.

    Okay, I’d like to add my vote for this. I was just bitten during a server upgrade at my host. WP Super Cache broke because the new server configuration reports the path to WordPress differently from the old, and WPCACHEHOME was hard coded to the old.

    Changing WPCACHEHOME to use ABSPATH worked for me, as in:

    define( 'WPCACHEHOME', ABSPATH . 'wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager

    although WP_CONTENT_DIR did not. It was not seen as a constant by get_wpcachehome(), which saw it as a string and did not expand it. I didn’t spend much time on it, once ABSPATH worked.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘please update WPCACHEHOME path to something more dynamic’ is closed to new replies.
Skip to toolbar