If you are searching for a stress-free way to merge two websites into one website, then you are in luck.

I assume you are not confusing merging two websites with migrating or moving a WordPress website from one domain name to another.

This article is intended for those who have two separate websites, but wish to move the content from one site (the secondary site) to another (the primary site) – they want to merge two websites.

It is for individuals who want to consolidate their content marketing efforts under one roof, either for ease of management and administration, or even the merger of two companies.

If that is you, then let’s proceed.

The process of merging two WordPress websites is relatively smooth and painless. Depending on the size of your website, it should take a couple of minutes to fully merge the two websites.

Step by Step: How to Merge Two Websites into One Website in WordPress

Before you start, Install all the required plugins to the primary website.

Step 1: Backup the primary website.

Preparing for a successful merger should include preparing for the unimaginable worst-case scenarios. Use WPvivid backup and restore plugin to back up your website to a remote storage provider before you start.

Backup primary website

Step 2. Export data from the secondary site.

Log in to your WordPress Admin panel, on the menu under Tools, click Export.

WordPress tool export

Choose what to export.

Choose items to export

Tip: For a relatively large and complex website, export one content type at a time. It may take you a couple of rounds to complete though.

Also, export only the items you need. If you only want to merge the posts, then only export Posts. There is no need to export menus, or footers or pages when you do not need them on the primary site.

When you export an individual item – say, posts – define what to export.

Choose posts to export

When you have defined what to export, click the Download Export File button to download an XML file.

Export xml file

Step 3: Import data to the primary website

Now login to the WordPress admin panel of the primary website.

Under Tools click Import.

WordPress tools import

On the page that opens, scroll down to install the WordPress tool that you will use to import content.

Click Install Now.

Install import tool WordPress

Click Run Importer.

Run importer

Click the Browse button to choose the file you exported from the secondary website, and click Upload file and import.

Upload and import

Next, assign authors to your content. You can create a new user or assign existing posts to a current user or import the authors from the older site (remember to set passwords for these users when you are done).

Once you have assigned your posts to a user, check the Download and import file attachments if your content contains attachments.

It will import all images and files associated with the content imported.

Next, click the Submit button.

Submit upload

It will take a few seconds or a couple of minutes for large websites, but, once it is complete, you are greeted to the all done page. This page also shows what files failed to import.

Import done

Step 4: Set Up URL redirects on the secondary web server.

What you need to do next is to redirect traffic from the old website to the merged website.

On an Apache web server, you do that by adding the code below to your .htaccess file that is found in the root of your public directory. Change mergedsite.com to the domain name of the old or secondary site.

#Options +FollowSymLinks

RewriteEngine on

RewriteRule ^(.*)$ https://www.mergedsite.com/\ [R=301,L]

Step 5: Update internal Links

If you had a good on-page linking strategy – as you should – on the old website, you should be having hundreds if not thousands of links pointing to the old web server.

What you need to do is go through all the posts with links and update them to the URL of the new website.

To make process painless, use a plugin like Velvet Blues Update URLs or Go Live Update URLS.

Conclusion

Merging two websites shouldn’t be a nightmare, prepare for it, back up your site, export data, and finally import the data to the primary site. There is nothing manual or complicated about the whole process – that we have shown you in this article.

For old websites that were doing well on search engines, add an extra step to inform Google and the other search engines to de-index the old site from its database.

That’s it, hopefully you’ve found this read helpful. You may also want to learn how to move a WordPress site to a new domain without losing SEO.