Multiple configuration files for WP Rocket

WP Rocket writes an important PHP configuration file inside /wp-content/wp-rocket-config/your-website.com.php.
The filename is created following the same domain you are using on your WordPress configuration.

For example: if your site is called www.ThePerformanceSite.com, the file will be named: www.theperformancesite.com.php
The same goes for subdomains, on: subdomain.yoursite.com we will create a file called subdomain.yoursite.com.php 

In some special cases, where there are multiple URLs sharing the same filebase, domain forwarding, proxied domains, etc. multiple config files are needed, one per domain name.

WP Rocket can't detect this special configuration, so to work around this, you can use the following helper plugin.

WP Rocket is not designed to work with this setup by default and we cannot provide further support or troubleshooting beyond what's presented in this article.

Helper plugin

The following helper plugin will create any additional config files that are required by your specific setup.

📥  Download (.zip): WP Rocket | Multiple Config Files
Developers: You can find the code for this plugin on GitHub.

Manual code edit required before use!

Installation

To install the plugin please follow these steps:

  1. Download the helper plugin ZIP file.
  2. Customize the plugin's code:
    Replace the example provided in line 27, $extra_url[], with the real URLs for which you need to generate the config files.
    You can also add new URLs as needed, one per line:

    $extra_url[] = 'another-url.com';
    $extra_url[] = 'and-another-url.com';
    $extra_url[] = 'and-yet-another-url.com';
  3. Install the helper plugin on your site - go to Plugins → Add New → Upload plugin and select the zip file.
  4. Activate the plugin
  5. Deactivate and Reactivate WP Rocket so the required config files are created
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.