Skip to content

Instantly share code, notes, and snippets.

@max-cmoa
Last active November 11, 2019 17:16
Show Gist options
  • Save max-cmoa/f3d1d9fc3902919c42cf74bab4f58f83 to your computer and use it in GitHub Desktop.
Save max-cmoa/f3d1d9fc3902919c42cf74bab4f58f83 to your computer and use it in GitHub Desktop.
Copy database, theme files, and images from one WordPress install to another.

Migrate WordPress Database

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

How to pull the production db content down to your local site

  1. First, if you don’t already have copies of the WP Migrate DB Pro plugins, go to deliciousbrains.com, login, my account, licenses, downloads, and download the latest versions. Account info and License Key are available in 1Password.
  2. Install and activate the suite of WP Migrate DB Pro plugins in your local WordPress plugins directory. Activate plugins from the WordPress dashboard, network admin, plugins, and for each plugin click "Network Activate" Note: these plugins need to be active on both sites. Also, be sure to add the License Key: Admin > Tools > Migrate DP Pro > Settings or Network Admin > plugins > WP Migrate DB Pro and click Settings which is in small text under the text WP Migrate DB Pro. Find the area to enter the license key and copy and paste the license key to that area from 1Password.
  3. Once the plugins are installed, go to the production website’s admin to copy the connection info: Admin > Tools > Migrate DP Pro > Settings > Migrate For Multisite installs, go to Network Admin > Settings > Migrate DB Pro > Settings > Migrate.

In Network Admin goto Settings > Migrate DB Pro > Check Pull > and enter the following connection info: https://cmoa.org Find this key in 1Password under WordPress for cmoa-2016

In Migrate DB Pro > Settings > under Permissions set pull to On

image

  1. 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.


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

image

  1. Check the Tables menu to include only the production WordPress tables.
  2. If this is the first time spinning up a local version of this site:
    • Check Media Files
    • Check Theme Files
    • Check Plugin Files
    • Save Migration Profile - include a meaningful name In future updates, downloading all these files may not be necessary.
  3. Check over your settings, if all looks right, push the “Pull” button at the bottom of the page.
  4. Migrate DB Pro will launch a modal window detailing your migration progress and indicate any issues.

image

  1. Once complete, you will likely be forced to log off with a prompt to update the database and/or login again with credentials from the production site.

We only go up to 11! 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