Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save max-cmoa/6d94b81cb491eef0a7676f68b20963d9 to your computer and use it in GitHub Desktop.
Save max-cmoa/6d94b81cb491eef0a7676f68b20963d9 to your computer and use it in GitHub Desktop.

Migrate WordPress Database

Copy your database from one WordPress install to another with one click from the dashboard with WP Migrate DB Pro.

Step 1: Get Plugin

Go to deliciousbrains.com, login, and download the latest versions of the plugin. Account info and License Key are available in 1Password.

Step 2: Install and Activate

Install and activate all WP Migrate DB Pro plugins to your local WordPress plugins directory. These plugins need to be active on both sites.

Some of these require special steps like you may have to login to get the Pro version or find the license key in 1Password Place the following plugins inside of the "wp-content/plugins" directory

  1. Goto Advanced Custom Fields login to your account and download the advanced-custom-fields-pro.zip directory, activate the Advanced Custom Fields PRO plugin from the dashboard then follow this guide to enter the license key (found in 1Password)
  2. WP Migrate DB Pro, Media Files, CLI, Multisite Tools, Theme & Plugin Files
  3. WP Static Data

New installations will need the plugin license key. Copy the key from 1Password and paste in the plugin’s settings: Admin > Tools > Migrate DP Pro > Settings.

For Multisite installs: Network Admin > Settings > Migrate DB Pro > Settings.

Step 3: Connect

  • Once the plugins are installed and activated, go to the production website’s admin to copy the connection info: Admin > Tools > Migrate DP Pro > Settings > Migrate.

For Multisite installs: Network Admin > Settings > Migrate DB Pro > Settings > Migrate.

image

  • Set the permissions on the production site to Pull data.

image

  • Now, go back to the local install and paste the connection info: Admin > Tools > Migrate DP Pro > Settings > Migrate
    • Choose “Pull”
    • Paste connection info

Note: you may get a warning about “Different Table Prefixes” that will need to be resolved before continuing. Use phpMyAdmin or use a Search & Replace plugin to amend the local database.


  • Use Migrate DB Pro’s find and replace tools to replace the remote domain with the local domain.

image

  • Check the Tables menu to include only the production WordPress tables.
  • If this is the first time setting up a local version of this particular site, download Media, Theme, and Plugin files (If a plugin is missing, you may not need to follow this step):
    • Check Media Files
    • Check Theme Files
    • Check Plugin Files
    • Save Migration Profile - include a meaningful name

Step 4: Pull Database

Check over your settings, if everything looks in order, push the “Pull” button at the bottom of the page.

Migrate DB Pro will launch a modal window detailing your migration progress and indicate any issues.

image

Once complete, you will be forced out of the local WordPress admin. Login with the production credentials.

You should be all set. Check over the site and make sure everything is in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment