Support » Plugin: WP Super Cache » Can I install/configure the plugin on my live site and dev site?

  • Resolved cag8f

    (@cag8f)


    Hello. I have a live site at https://www.example.com/ and a private dev site on a sub-domain, at https://dev.example.com/ If I install your plugin on both sites, will there be any issues? Will I have to take care to configure either in a special manner?

    I realize there is no publicly facing need for the dev site to have caching enabled. But to help troubleshoot issues on the live site, I’d like both dev and live site to be subject to the same caching rules (if possible).

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • @cag8f If these are separate wp installations then it shouldn’t be an issue as both should have their own .htaccess. If however, you are using a multisite and dev.example.com is a sub-domain blog of http://www.example.com then the plugin is already installed. In this case be sure to network active the plugin and the settings will be virtually identical for both as in a multisite installation the majority of settings are applied globally.

    Thanks for the reply. Here are my follow-ups.

    * I forgot to mention that this is indeed a multisite. But none of the sub-sites are on sub-domains–they are all on sub-directories. So the main site and sub-sites are:

    https://www.example.com/
    https://www.example.com/site1
    https://www.example.com/site2
    https://www.example.com/site3
    https://www.example.com/site4

    And the dev site main site and sub-sites are:

    https://dev.example.com/
    https://dev.example.com/site1
    https://dev.example.com/site2
    https://dev.example.com/site3
    https://dev.example.com/site4

    So in my case, the live site and dev site are two completely separate WordPress installations. Installing a plugin on the live site and ‘network activating’ it will not install/activate it on the dev site. In light of that, are there any special settings/instructions I need to consider?

    I also neglected to mention that the site is on an nginx server. Does that change anything?

    Thanks.

    @wlpdrpat Any update to this? I’d like to install and begin using your plugin, but only if I know there will be no issues with my site being a multisite, and with having a dev site on a sub-domain.

    Thanks.

    @cag8f First, it’s not my plugin. I am an experienced user of the plugin with multisite (over 8 years). I manage more than a dozen multisite installs that use this plugin.

    As I previously mentioned, if these are separate wp installations then it shouldn’t be an issue as they use separate .htaccess regardless of the fact that the dev site is on a sub-domain.

    Regarding nginx: I utilize nginx for my WAF. I haven’t tried it for hosting WP. However, from what I have heard from others there shouldn’t be any problems using WP Super Cache on nginx.

    @wlpdrpat Thanks for the reply. I understand you are not one of the plugin devs. I do indeed believe you know what you’re talking about, and would like to leverage your experience and take your suggestions to heart. But I just want to be sure I’m understanding them before proceed.

    >> As I previously mentioned, if these are separate wp installations then it shouldn’t be an issue as they use separate .htaccess regardless of the fact that the dev site is on a sub-domain.

    I’m not sure how relevant this statement is to my situation. As I mentioned, my server is on an nginx server. And as I understand, nginx servers don’t support .htaccess files. At least, I know my nginx server does not recognize redirects I add to .htaccess–I have to add redirects to the nginx server config. So in light of that, would WP Super Cache be able to read my .htaccess files? I’m not trying to challenge you or argue with you–I generally don’t know and am interested in learning more.

    >> Regarding nginx: I utilize nginx for my WAF. I haven’t tried it for hosting WP. However, from what I have heard from others there shouldn’t be any problems using WP Super Cache on nginx.

    OK got it.

    Hi @cag8f

    Here is an article on how to configure WP Super Cache with nginx that is very step by step. It should prove helpful in getting you setup.

    https://www.metachris.com/2016/02/how-to-optimize-wordpress-performance-with-nginx-and-wp-super-cache/

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    If the paths on your dev and live servers are the same then the configuration of both will be the same, but this includes the path to the root “/” of the web server. If your dev site is in /home/dev and live site is on /home/www/ then the config will be different.
    Install the plugin on your dev server and look in wp-content/wp-cache-config.php and you’ll see. It also adds lines to wp-config.php.

    On a multisite install the plugin loads regardless of whether it’s enabled on a blog as it loads before most of WordPress loads.

    There’s no need to mess with .htaccess rules or the nginx equivalent. You can run the plugin in “simple” mode where PHP processes requests. It might be a tiny bit slower but unless your server is regularly hit by huge spikes in traffic you won’t notice any difference.

    However you might need to replicate the .htaccess in wp-content/cache/.

    Nginx isn’t supported by the plugin but there are tutorials like the one above available.

    OK. I installed it on my nginx multisite, and left it in ‘Simple’ mode, and the caching seems to be working as expected. I don’t think I’ll need anything in ‘Expert’ mode for the time being, so let’s consider this resolved.

    Also, for the future, there’s a section on configuring WP Super Cache on nginx in the WordPress Codex (page here). That’s probably all for “Expert Mode” stuff though.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can I install/configure the plugin on my live site and dev site?’ is closed to new replies.