Documentation

Migrating to HTTP (or back to HTTPS)

Version 1.7 and up

As of WP Migrate DB Pro 1.7, urls are now converted to the correct protocol if they differ between migration targets – no extra steps are required by the user.

For example, if your remote site is at https://examplesite.com and your local site is at http://examplesite.dev , after running a pull migration, your local site url will still be http://examplesite.dev. Previously, an additional find and replace row was required to handle this protocol conversion. This is now handled automatically.

Additionally, a hook was added to disable this protocol conversion, if desired. The wpmdb_replace_destination_protocol filter can be used to override the protocol conversion logic by returning false in the callback function.

Version 1.6.1 and below

WP Migrate DB Pro 1.6.1 and below required the following steps to correctly convert protocols between migration targets.

If you need to migrate a production website that is using HTTPS down to your local environment, you’ll need to add another find/replace row to the default values to replace https://example.dev with http://example.dev. WP Migrate DB Pro will run the find/replace in order, so you need to search for local versions of the URL that are running HTTPS:

Screen Shot 2016-07-04 at 2.17.48 PM

Similarly, if you need to migrate the database for that website back up to production, you’ll need to an extra find/replace row to replace http://example.com with https://example.com.

It’s important to leave the default find/replace values and add the extra find/replace for the protocol after the default find/replace values. This makes sure that all protocols get updated correctly, since it’s possible that your site might have more than just HTTP or HTTPS URLs stored in the database.