This documentation is only valid for older versions of Wordfence. If you are using Wordfence 7 or later, please visit our new documentation.

Migrating wordfence

From Wordfence Documentation
Jump to: navigation, search

Migrate Wordfence by Disabling the Firewall (recommended)


It is recommended to temporarily Remove Extended Protection before migrating a site with the Wordfence Firewall installed. The steps below will walk you through the built-in wizard.

1. At the bottom of the Wordfence Firewall page, there is a section called Advanced Configuration where you can Remove Extended Protection.

Wordfence Advanced Configuration Remove Extended Protection.png

2. After clicking the Remove Extended Protection button, you will be redirected to the Remove Auto Prepend page.

Wordfence Advanced Configuration Remove Auto Prepend.png

3. After clicking the continue button, you will be asked to download a backup of the server configuration file(s). You must download a backup before continuing.

Wordfence Advanced Configuration Download Config Files.png

4. After clicking the continue button, you will see a message similar to this:

Wordfence Advanced Configuration Finishing Removal of Firewall.png

Wait for the changes to take effect, and proceed with the migration. After migration, re-enable the firewall and verify it is in Learning Mode. This will allow the firewall to adapt to the new server environment.

NOTE: Server configurations will vary and you will more than likely be presented with different information than what is shown above.


Migrate Wordfence by Disabling and Resetting the Wordfence Plugin


At times, it may be necessary, and advantageous, to disable and reset Wordfence to defaults before migration. To do this, scroll to the bottom of the Wordfence Options page to the Other Options section. Toward the bottom of this section, check the box next to the Delete Wordfence tables and data on deactivation? option.

Wordfence Options Other Options Delete Wordfence Data.png

After saving the Wordfence options, navigate to the Wordpress Plugins page and disable the Wordfence plugin. This will disable Wordfence and reset all options back to the defaults without uninstalling the plugin completely. After migration, re-enable Wordfence and go through the setup steps from the beginning.

NOTE: Instead of going through the setup process from scratch after migrating, you may export your Wordfence options before migration, and import them after, by following the guide below.


Migrate Wordfence - Export / Import Wordfence Options


Optionally you may export your Wordfence options before migration, and import them after.

1. Scroll to the bottom of the Wordfence Options and click the button to export your settings.

(screen shot coming)

2. If the export is successful, you will be given a secure token which is an alphanumeric string approximately 128 characters long. Copy the token and paste into a safe place. It will be used later to import the settings.

(screen shot coming)

3. Please keep this token secure because if anyone else gains access to this string they will be able to import your Wordfence settings (excluding your API key). You should think of your token like a password. Currently Wordfence does not expire these tokens, so your exported settings will be available indefinitely. This policy may change in future.

(screen shot coming)

4. After migration, go to the Wordfence Options page and scroll to the bottom. Paste the token into the text field next to Import Settings. Then click the Import Settings button.

(screen shot coming)

5. Your settings should be instantly imported. You will be shown a message telling you how many Wordfence options were imported and you will be asked to reload the current page.

(screen shot coming)

You can simply click the button shown to reload the page and see your new settings.

NOTE: The import / export feature is specifically for the Wordfence plugin options. It is not related to the Wordfence Firewall in any way.


Migrate Wordfence by Manually Removing the Firewall

Reference: [1]