Export/import settings and version rollback

The Tools tab in WP Rocket provides several options to help manage the plugin settings and version.

Export/import settings

Export/ Import Settings

To Export your settings, press the Download Settings button. A JSON file will be downloaded to your computer with your options enabled and entries provided on each tab.

To Import your settings, browse for the JSON file on your computer, and then press the Upload File and Import Settings button. Your saved settings and entries will be populated on each tab.

Export settings when you can't access the Tools tab

If by any reason, you can't access WP Rocket's Settings page, and therefore the Tools tab, you can still export the current settings by installing the following helper plugin:

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

This helper will create a menu item under WordPress > Tools called Export WP Rocket Settings, which leads to an admin page where you can click on the Download WP Rocket Settings button to initiate the download of WP Rocket settings.

Troubleshooting

When importing the settings file, the following error notices can appear:

  1. Settings import failed: unexpected file content.

    This can happen when the JSON file is decoded and the resulting data is empty or there are characters in the settings that break the content.

    You should make sure the file encoding is set to UTF-8 and retry.

  2. Settings import failed: incorrect file type.

    This message will be displayed when the filetype of the JSON file is not text/plain and application/json.

    This will usually be a result of the server's configuration which doesn't set the correct MIME type for JSON files.

    You should reach out to your host and ask them to set the right MIME type for JSON files,    application/json, to your server configuration.

  3. Failed - Network error

    This can be caused by the mod_deflate rules WP Rocket is adding in the htaccess file. 

    You should install this helper plugin to prevent WP Rocket from adding the mod_deflate rules, and this will allow you to export the options.

  4. Settings import failed: incorrect filename.

    This happens if you modify the filename of the exported .json file. 

    For example below:

    wp-rocket-settings-wp-rocket.me-2024-09-11-66e970b0f1h87.json will work!

    wp-rocket-settings-allowme.json will not work!

Version rollback

Rollback

To rollback to the previous major version of WP Rocket, press the Reinstall Version [number] button. The previous version will be downloaded and updated on your site.

Tip: if you need to rollback to a different version

You can also rollback to a previous version other than the latest major version by adding the following snippet in the wp-config.php file while changing 3.9.2 to the desired version:

define( 'WP_ROCKET_LASTVERSION', '3.9.2' );

Note:
Be sure to place the line before:
require_once ABSPATH . 'wp-settings.php';

After clicking on the button, you should see the resulting rollback page as follows:

You can choose to either return to the WP Rocket settings Tools tab or to your site's plugins page from the links below.

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