Support » Plugin: WP Super Cache » Alternative method of defining WPCACHEHOME

  • Resolved Lance


    Hello, I was looking for the answer to this but could not find it.

    I have a client that is hosted on a service that locks down their wp-config. Is there another place I can define this that would work? I attempted

    add_action( 'muplugins_loaded', 'define_wpcachehome' );
    function define_wpcachehome() {
    define( 'WPCACHEHOME', '\app\public\wp-content\plugins\wp-super-cache/' );

    but I am still getting an error message. Any suggestions would be appreciated. Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Donncha Ó Caoimh


    But how do you define the WP_CACHE constant? That’s supposed to go in there too.

    PHP has some sort of “pre include” directive. I can’t remember exactly what it is, but I think you can enable it in a .htaccess file. You could define it in that file perhaps?

    Thread Starter Lance


    The hosting company is Flywheel. They have a WP_CACHE toggle switch in the backend I can enable for their caching which is basically a DEFINE WP_CACHE. I understand it isn’t ideal to run their cache along with another system, but the issue I am having is their refusal to let me configure the caching with my client’s edge case use of query strings with a massive posts table.

    I am unfamiliar with the “pre include” directive, but I will take a look. Thank you!

    Your plugin is one of the only I found that works wonderfully for my performance issues on my non flywheel development environment and is what I am trying to setup on their platform with their “not recommended but we will allow it” stance.

    I thought I would be golden with the muplugins_loaded action since it loads before plugins, but I haven’t looked into how you actually check for WPCACHEHOME yet. I’ll start there if the “pre include” doesn’t pan out.

    • This reply was modified 1 year, 6 months ago by Lance.
    Plugin Author Donncha Ó Caoimh


    WPCACHEHOME has to be set before WordPress loads, that’s why the mu-plugins plugin didn’t work. You could also set it at the top of wp-content/advanced-cache.php but that file will be owned by the web server so you’ll need to sort out those permissions before editing the file probably.

    Thread Starter Lance


    Sorry for the late reply, but thank you. This worked out well for me. Resolved!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Alternative method of defining WPCACHEHOME’ is closed to new replies.