Multiple configuration files for WP Rocket
WP Rocket writes an important PHP configuration file inside
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 solve this, you can use the following helper plugin.
The following helper plugin will create any additional config files that are required by your specific setup.
Manual code edit required before use!
To install the plugin please follow these steps:
- Download the helper plugin ZIP file.
- 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';
- Install the helper plugin on your site - go to Plugins → Add New → Upload plugin and select the zip file.
- Activate the plugin
- Deactivate and Reactivate WP Rocket so the required config files are created