WordPress is a great blogging platform and it can be an amazing experience to set up different websites with WordPress.There are many bloggers who have multiple sites all of which are hosted upon WordPress. Having multiple sites might seem like a good idea if you write or sell a product or a service that belongs to different niche.
But what would you do, if you ever want to merge your sites into a single one?
Why Merge Two WordPress sites together?
- 1 Why Merge Two WordPress sites together?
- 2 Merging of two WordPress Sites
- 3 Steps For The Merging Process
- 4 Step 1 – Prepare for Export
- 5 Step 2 – Exporting the contents of your old WordPress site
- 6 Step 3 – Importing your WordPress content onto your new site
- 7 Step 4 – Assign a user to your imported contents
- 8 Step 5 – Setting up URL Redirects
- 9 Step 6 – Update Internal Post Links
- 10 Step 7 – Importing your images
- 11 Blog’s didn’t merge correctly? Here’s what you need to do
- 12 Some Useful Information to keep in mind
- 13 Conclusion
Sometimes you may own multiple WordPress blogs but later you might want to get your sites merged into a single one. By merging 2 sites together, I mean taking all the contents from one blog and setting it up on another to create one single blog.
Now, this is not to be confused with migrating a website, which involves transferring everything, including your domain name from one place to another.
There could be a lot of reasons for merging multiple WordPress sites.
- Managing two or more websites is easier then managing one, for obvious reasons. You could either spend your time on running, maintaining and keeping backups of two or more sites or you could focus on the growth and maintenance of 1 site.
- You may want to start a new blog/site by combining all the old contents so that you can have the entire contents in one location.
- You could also merge if one of your blogs is not doing well and you want to merge with one of your other blogs that’s doing comparatively well.
- Also in certain cases it is preferable to have a single extensive site instead of multiple smaller sites/blogs.
Besides having multiple sites have got its own problems.
- Time and Effort – Each site will require individual attention since each one will have its own unique content, regular updates, SEO and so on. This will consume more time and work. Also all of these will require extra cost, more staffing, tech support and more maintenance.
- Search Engine Ranking – Even if you are able to manage multiple sites while ensuring that there is no duplicate content. It’s still not a great idea to have multiple sites because they will compete with each other to rank in the search engine results.
- Organization – More than just scheduling regular maintenance and content updates, you will also have to make sure that your marketing messages are consistent across all platforms, including the websites.
Merging your sites into one can solve all your problem. So let’s look at how you can do it without any technical knowledge.
Merging of two WordPress Sites
There are a few steps that you need to follow when you are merging two sites/blogs. Before merging or performing any other crucial activities it is highly recommended to perform a backup of your WordPress sites. That way, if anything goes wrong with the merging process you can always revert back.
Back-up your WordPress Blog
To perform a complete backup of your site, you can either use WordPress plugins or do it manually.
To perform a backup using plugins, you can use anyone of the following –
Each of these plugins have their own advantages as well as disadvantages. So take a look at this plugins and choose the appropriate one for you.
The other processe is not for beginners and involves typing a few lines of code from the CLI (Command Line Interface). This is a universally accepted process and on executing the following code all your posts, uploads, settings, theme files and anything else on your site and server, including the hidden .htaccess files will be backed up.
It’s also portable, enabling you to copy and save it anywhere else.
The code is –
cd /path/to/wordpress/ mysqldump -u $dbuser -p $dbname>backup.sql tar -cf ../backup.tar.gz -z .
//Note: You can get database info from wp-config.php
Apart from backing up, you also need make sure that both of your sites have an identical permalink structure set up before moving forward with the process. This is essential for maintaining your SEO rankings.
Steps For The Merging Process
Below I have mentioned a few steps to outline the entire process.
- Preparing before Export
- Exporting the contents of your WordPress site as an XML file
- Importing your WordPress content to your new blog/site
- Assign your imported content to a new user
- Set Up URL redirects
- Update internal Post Links
- Merge Categories and Tags
- Import your images
- Check the WordPress settings and content success rate.
Step 1 – Prepare for Export
Before exporting your old site, there are a few things that needs to be taken care of –
- Convert any old < / iframe >, < / embed >, or < / script > code to use shortcodes or an alternative method, because they may not get imported
- Similarly, edit any shortcodes that won’t be available on the new site, whether theme or plugin specific. If necessary, add the shortcodes to the new site
- Clean up your categories and tags, since they’ll all import as-is
- Clean up your Media. Go to Library -> Unattached to see if you want to delete any of those. Look for the “missing image” image to find files in your database but not on your server and delete those via wp-admin (or re-upload)
- Cleanup your custom fields, including those set by plugins that redirect to another page
Step 2 – Exporting the contents of your old WordPress site
In this step we will export all the contents. WordPress comes with a built in plugin that enables you to export the entire site’s/blog contents including post, pages and custom post types. It’s similar to copying the contents of your old site into a single XML file.
To perform the above mentioned task, head over to your WordPress dashboard of your old site. Then go to Tools -> Export. Here you will find a radio button for exporting the full contents. Select that radio button.
However, if you want to filter what you want to export, then you can continue with the other radio buttons. In our case, we will select the All Content radio button.
After making the desired selection, click on the Download Export File which will trigger the downloading of a single XML file. This file will contain a striped down version of all the contents of your site along with the structure. Save the file on your system.
Step 3 – Importing your WordPress content onto your new site
In this step we are going to merge the exported contents with our new WordPress site. To perform an import, head over to the dashboard of your new site and click on Tools -> Import tab.
Here you will find several options for importing contents from various platforms such as from Blogger, Squarespace, WordPress, LiveJournal, Tumbler and so on.
ince we are using WordPress, locate the WordPress option at the bottom and click on Install Now. Wait a few seconds till the Install Now button gets converted to Run Importer. Click on Run Importer.
Upon clicking, you will be redirected to a new page, where you will be required to upload an XML file. Click on Choose File button and select the XML file we saved in Step 1.
Now click on the Upload file and Import button.
The amount of time this process takes will depend on the amount of contents there is to import. After the process is complete, you will be taken a new Assign Authors page
Step 4 – Assign a user to your imported contents
In this step you will be asked if you want to create a new user for the imported contents or want to keep the original user.
Select which one you want and click on the appropriate option. In case you choose a new user, provide a new user name in the space provided.
There is also another option Import Attachments. This setting is just to maintain the links to the original attachments from your old site/blog.
Check this radio button and finally click on the Submit button and you are done.
On the following page, you will be presented with a message “All done. Have Fun!”. This means that the merging is successful.
Step 5 – Setting up URL Redirects
Maintaining your SEO rankings after merging is crucial for your site. And to maintain the SEO, you will need to set up URL redirects for your old posts and pages, so that your existing readers are redirected to your new site.
To do so, you can either use a Simple 301 Redirects plugin or modify your .htaccess file.
In this article we will take the latter approach of modifying the .htaccess file. This is just a simple text file with multi-tasking features such as performing redirects or compressing the HTML and .txt file.
To access the file, navigate to your old blog’s root directory using any FTP client such as FileZilla. There you will find your .htaccess file. Right click, select Edit and add the following code –
#Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.yournewsite.com/$1 [R=301,L]
Replace the URL with the URL of your new site. Also take note whether to use http or https, depending on what is used on your new site.
Save the file and you are done. Now all your visitors will be redirected to your new site, when they try to access the old one, thus maintaining your SEO.
Step 6 – Update Internal Post Links
Simply redirecting your posts does not mean that the links inserted inside those posts will also get redirected to your new site. To do so, you will need to update URL’s.
For that you can use plugins such as Velvet Blues Update URLs plugin. Install the plugin and provide the URL of your old site and your new one. There are also various options provided which you self-explanatory.
The first option selects all the necessary contents. If there are links in the posts excerpt, select the second box as well.
Choose the settings as required and click on Update URLs NOW button. Youhave now successfully updated URLs.
Step 7 – Importing your images
Importing images is a bit difficult than importing your content. There is a possibility that some of your images might not get imported properly. To fix this you can either take the help of plugins or do it on your own by uploading those images manually into the media library.
If you prefer to automate the task, then you can go for the “Search and Replace” plugin. First of all, you need to download all the media files from your old site and upload those images into the same directory on your new site.
Now to replace the links we can install the “Search and Replace” plugin and fill in the required fields with the old and the new site’s URL.
That’s all the steps to merging 2 WordPress sites. Now you are in possession of a new site with all the contents from multiple sites.
Blog’s didn’t merge correctly? Here’s what you need to do
The steps listed above will get your job done. However, WordPress is complex and there are possibilities that something may go wrong for one reason or another.
- Your site may encounter a new large-scale bug or some other programming glitch. In that case, it is preferable to restore it to its old state using the backup you made earlier.
- If your imported images are not displayed properly, check the plugin used for that purpose and repeat the process. Don’t restore your site for such minor issues
Some Useful Information to keep in mind
Here’s a bit of information that you might find useful –
- Before you think you’re completely done, make sure to use WordPress’ built-in search for unattached media by clicking the “scan for lost attachments” link within the Media Library
- Consider importing all new content into a new user, like ‘wpimport’ on the new site. This will allow you to find exactly what content was imported during your finalization process and, once the new site is all cleaned up, you can always delete the user and assign all of the ‘wpimport’ user’s content to another user of your choice.
- Let people know that you have moved. Not everyone is tech savvy and understand HTTP error codes. Display a proper pop-up message to say that you have updated your URLs for anyone who is redirected to the new site from the old one.
Once your site is Live, use Google Search Console to inform the search giant Google that the site has been moved. You can use the Change of Address tool for this purpose
Do the same for Bing using the Bing’s Site Move Tool
Check for 404 errors i.e page not found errors. Use the Free Google Analytics Plugin, it can tag 404 errors and that makes it easy to see them in Google Analytics. You can also correct 404 errors from Google Search Console.
Merging multiple sites is highly beneficial. One of the main advantages is less maintenance for the content creators. Also it is ideal if one of your sites is not getting that much of a traffic as your primary sites.
Also from the visitor’s point of view, they always find it easier if everything they want is available in a single site. Moving around multiple tabs on their browser is something users tends to avoid.
Thus having all your content in one single site is more engaging and saves time of your visitors, giving them the ability to view more of your content.