Changing Domains and Migrating Sites with WP Rocket

When you change the domain for your site, or you move a site from a development URL to a live URL, there are a number of things to take care of. Here are the ones related to WP Rocket:

De-activate and re-activate WP Rocket in its new location, so that the configuration file can be updated correctly.

This should be all that is required. If you still have problems, you should manually check the following: 

/wp-content/wp-rocket-config

There should only be 1 php file here, named with your site’s domain, for example: www.example.com.php 

If you see another file with the domain name of the old site, or of a development site, just delete it.

/wp-content/advanced-cache.php

When you re-activate WP Rocket, the plugin should automatically create or update this file, but you can double-check it to make sure it has the correct paths in it. 

If think it might be incorrect, or if you're not sure, you can delete the file. Then de-activate and re-activate WP Rocket, so the file will be regenerated.

/wp-content/cache/wp-rocket

There should be a folder named with your site's domain here. For example: www.example.com

If you've duplicated the website from your development site, you might have a folder named like your dev site, or the previous domain your site used. You can delete that old folder. 

WP CLI user?
You can use our WP Rocket CLI to re-generate the necessary files. Please see:  https://github.com/GeekPress/wp-rocket-cli, and specifically the wp rocket regenerate command.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.