• Hi,

    I run one wordpress folder for a few sites (under completely different domains), which works well, apart from when installing WP-Super-Cache.

    The two issues I hit were:

    1. My wp-config.php file actually just imports the site-specific config file like so:
    <?php include $_SERVER[‘DOCUMENT_ROOT’] . ‘../wp-config.php’ ?>

    So when this is added as part of the install:
    define(‘WP_CACHE’, true); //Added by WP-Cache Manager
    It simply doesn’t work. (It shows that at the top of the page!)

    You might consider that is just due to my strange setup, however, the second is more of an issue:

    2. I get this error (folder structure disguised, but hopefully makes sense):
    [Thu Jul 29 23:37:31 2010] [error] [client 127.0.0.1] PHP Warning: include() [function.include]: Failed opening ‘/Absolute/Path/To/Site//wp-content/Absolute/Path/To/Site/wp-content/plugins/wp-super-cache/wp-cache-base.php’ for inclusion (include_path=’.:’) in /Absolute/Path/To/Site/wp-content/plugins/wp-super-cache/wp-cache.php on line 53

    That’s the first use of WPCACHEHOME

    If I add this line to my wp-config.php file it works fine:
    define( ‘WPCACHEHOME’, WP_CONTENT_DIR . ‘/plugins/wp-super-cache/’ );

    So I think it must be due to the simlink to the wordpress folder?

Viewing 4 replies - 1 through 4 (of 4 total)
  • It probably is due to your unusual setup. You’ll probably just have to define WPCACHEHOME in each site.

    Thread Starter alastc

    (@alastc)

    Fair enough, but would it be possible to make the addition to the wp-config file more robust?

    E.g. check that the file contains one of the standard settings before adding something to it.

    It’s not an easy thing to do unfortunately. If you have separate wp-config files for each site how is the plugin supposed to know where each one is? I’m slow to add code that won’t be used by the vast majority of users when that code could screw things up for everyone else (and it has happened, one small little bugfix and it blows up in my face when it goes live).

    If you can send me a patch that does what you want then I’ll certainly look at it, but I don’t have any site set up like yours (I do have multiple sites using one WP, but they all have one wp-config.php, with a switch statement for db configuration).

    Thread Starter alastc

    (@alastc)

    I’m not really a programmer (front-end guy), but I was just thinking of logic like:
    If the file has a statement about WP database setting, add this line, else skip.

    However, your approach with the single wp-config file with switch statements might be a more robust approach all-round, so I’ll explore that instead ??

    Thanks for the suggestion!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Super Cache] WPCACHEHOME error when wordpress is in own folder’ is closed to new replies.