February 24, 2016

Merging Two WordPress MySQL Databases The Easy Way

For anyone who doesn’t have extensive knowledge of running custom scripts, getting two SQL databases to merge smoothly can be very difficult. Importing fragments of a database in phpMyAdmin, or trying to manually combine databases in a text editor

, is frustrating and time-consuming because the smallest overlap or syntax error between the two databases will corrupt the entire file.

Recently, we had a client who wanted to merge two of their WordPress sites (their current site and older database containing recovered data) together. Both databases had all kinds of custom post types and other fun stuff that was sure to make any attempt at manual combination a huge headache.

The fastest and easiest way to solve this problem is to set up our old database in a fresh install of WordPress, and then use WordPress’ native Import/Export tool.

1) Set up two new WordPress installs in a subfolder

If the old site isn’t hosted, you’ll need to get it set up and running, either in a subfolder on your server or locally on your computer using MAMP. You’ll want to set up two new installs of WordPress – one to host the old WordPress database you want to import, and the other one an exact copy of your current WordPress site, so you can test importing the data to make sure everything works smoothly.

2) Log into your old WordPress site’s Dashboard

Don’t have a log in for your old site? In phpMyAdmin, go to wp_users and, if you know which is account was the site’s admin, you can change their password. Click Edit next to their name, type in a new password in the user_pass field and select MD5 from the drop-down menu to the left. Then click the Go button at the bottom of the page.

screenshot-wordpress-admin-edit

Screen Shot 2016-02-24 at 10.46.12 AM

3) Go to Tools > Export

Install WordPress’ Export tool if asked.

screenshot-toolsexport

4) Select what data you want to export, and click Download Export File

If there are only certain sections you want to export, you may need to make multiple files.

Screen Shot 2016-02-24 at 10.25.46 AM

5) Log into your copy of your existing site.

6) Go to Tools > Import

Install the WordPress Import tool if asked.

7) Select “Wordpress”

8) Select the data file you made and click Upload File and Import.

If everything merges smoothly into the test copy of your WordPress site, then you are free to import the data into your real site.

Filed under:  Tutorials Web Development
Author:

Patrick Cameron

Patrick is a front-end developer and designer at SEOcial. He loves designing user interfaces, biking in the winter, and drinking too much coffee.
Leave a comment
comments powered by Disqus

Base Terminology

SEO is the process of affecting the visibility of a website or a web page in a search engine's un-paid ("organic") search results.
The semantic web refers to the next stage of the world wide web and aims to ascribe semantic meaning to all web content through a collection of systems of classification. This means that, in the future, machines will be able to better understand the content we produce, resulting in better search results, new applications and an Internet that is fundamentally different from the one we use today!
What if each of the objects around you had a unique identifier that can be connected to the Internet? The goal of the Internet of things is to equip all objects in the world with tags that allow them to be digitally organized or manipulated. The implications? Less theft, less waste and the ability to control your surroundings in a manner never before possible.
Conversion optimization is the practice of modifying the parameters of a lead-generating system to stimulate a higher success rate as defined by goals. Most conversion optimization is structured to create an increase in ROI (return on investment). We frequently use multivariate and A/B split testing when optimizing conversion, wherein we test two or more systems at the same time, analyze their performance and deduce precisely what action items will bring us closest to the set goals in the least amount of time.
Market diagnostics or analytics is the process of collecting and analyzing business data — especially consumer data. This allows us to assess and improve the effectiveness of a marketing campaign.
In many applications today, there is such a phenomenal quantity of data available that it's difficult to collect and process with traditional database tools. The field of collecting, manipulating and drawing conclusions from massive quantities of data from a particular source is known as big data.
What started as a CMS (content management system) that was only meant to create and edit blog content has grown at a tremendous rate to become the most ubiquitous system for developing websites on the internet. WordPress accounts for an incredible 15% of all sites on the web.

RT @ramsville: I love torrents so much I call it PirateBae.

5 months ago

A5: Few setups are better for understanding your users than GA with Google Tag Manager tracking events #semrushchat

10 months ago

A2: People may emotional decisions. They by products when the right emotion is stimulated. The right creative can do this #semrushchat

10 months ago

Request Our Portfolio





  1. Which option best describes you? *

  2. Are you a key decision maker in the business you represent? *