Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Merge Two WordPress Sites Together Without Losing SEO

Managing multiple WordPress websites can sometimes become overwhelming, and many website owners eventually decide to combine their content into a single, more powerful site. This can help streamline your workflow and reduce administrative tasks.

Our readers regularly ask us the best way to merge two sites without losing SEO. This is a common concern, as keeping search engine visibility during the transition will help you maintain traffic and authority. Luckily, WordPress comes with built-in tools to do this easily.

In this article, we will show you how to properly merge two WordPress sites together. We will cover all the important steps for a smooth transition that preserves your valuable SEO rankings.

How to Merge Two WordPress Sites Together Without Losing SEO

Why Merge Two WordPress Sites Together?

There are lots of reasons someone might want to merge two or more WordPress sites together.

For example, they may want to start a new WordPress blog by combining their old blogs, which allows them to have all their content in one location.

Or perhaps one of their blogs isn’t doing so well, so they want to merge its content with one of their successful primary blogs.

Often, WordPress users decide to merge their sites simply because it takes less time and effort to maintain a single website than multiple separate WordPress installs.

Instead of running, marketing, updating, and backing up two or more sites, they can focus on maintaining and growing just one WordPress site.

With that being said, let’s take a look at how to easily merge WordPress sites together. Here are the steps you’ll need to complete:

1. Preparing for the Migration

For the sake of this tutorial, we will say that you have a secondary WordPress site at http://secondarysite.com and you want to merge it with your primary website at http://primarysite.com/.

To make sure your content transfers smoothly from one site to the other, there are a few things you need to do in preparation.

Check WordPress Media Settings

You should check your media settings to make sure that the primary site won’t reject any images from the secondary site because of their size.

First, you need to visit the Settings » Media page on both websites.

Now make sure that the Medium and Large file sizes on the primary site have maximum settings the same or greater than the settings on the secondary site.

Media Settings Image Sizes

Next, you need to visit Media » Add New on both sites to check the maximum upload file size.

You need to make sure this setting on the primary site is the same or larger than the setting on the secondary site. If it is smaller, then some of your images may not be imported.

Check current file upload size limit

You can learn how to change this setting in our guide on how to increase the maximum file upload size in WordPress.

Install Any Necessary Plugins

Many WordPress plugins store data. These include eCommerce plugins, membership plugins, forum plugins, and more.

If this plugin data is stored in a special database table, and that table doesn’t exist on the secondary site, then it won’t be able to be imported. So, make sure you install the plugins on the primary site before you try to import their data.

Now, plugins handle data in a variety of ways, so there is a chance that data from some plugins won’t be imported anyway. It’s very important to manually check that all your important data has been successfully imported after following this tutorial.

Important: Don’t forget to create a complete WordPress backup of both of your websites using a plugin like Duplicator. This will come in handy in case anything goes wrong and you want to revert the changes.

2. Exporting Content From the Secondary WordPress Site

Now, you are ready to export all of the content out of the secondary WordPress website.

First, you need to visit the admin area of your secondary WordPress site and then navigate to the Tools » Export page.

Export content from your secondary WordPress site

Make sure that you select ‘All content’ option and then click on ‘Download Export File’ button.

WordPress will immediately prepare an XML file and download it to your computer. You will need this file in the next step.

This exported file will contain the following:

3. Merging Content Into the Primary WordPress Site

Now that you have exported content from your secondary site, it is time to merge it with the content on your primary WordPress site.

Head over to the admin area of the destination site (the primary site where you want the content to be merged) and visit the Tools » Import page.

Install WordPress importer

This page lists all the import tools that you can install and run on your WordPress site. Scroll down to the bottom and click on the ‘Install now’ link under WordPress.

Once the WordPress importer is installed, click the ‘Run Importer’ link to continue.

Run WordPress importer

Next, you will be asked to upload the WordPress export file.

You need to click the ‘Choose File’ button and then select the XML file you downloaded earlier.

Upload WordPress import file

Click on the ‘Upload file and import’ button to continue.

WordPress will now upload your export file and analyze it. After that, it will redirect you to the import settings page.

WordPress import settings

It will ask you to assign authors or create new authors. You can assign the imported content to an existing user on your WordPress site or create a new author.

Next, check the box in the ‘Import Attachments’ section. This will download and import file attachments such as your images and other media files from the other website.

However, in some cases, there may be images that fail to import, so some posts may still link to images on the secondary website. We will fix this in the next step.

You can now click on the ‘Submit’ button to run the final step of the import.

WordPress will import content from your export file and add it to your primary WordPress site. Once finished, you will see a success message.

WordPress import finished

Now, this page may also display a list of items that failed to import. Often this is because the item already exists on the website, but not always.

It may be that there was a problem importing an image or that a table that exists on your secondary site doesn’t exist on your primary site. As we said earlier, this can be caused by differing image settings on the two sites, by a missing plugin, or some other issue.

You may want to take note of these failed items in case you need to manually copy them from the secondary website.

4. Importing External Images

If there were any image import problems, then some of the posts you imported might still be loading images from the secondary website. These are called ‘external images’ and are not the best for WordPress performance or SEO. We will fix that in this step.

The easiest way to import external images is to install and activate the Auto Upload Images plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Note: While this plugin has not been updated in some time, it still works fine in our tests. You may want to read our article on whether to use plugins not tested with your WordPress version.

The plugin’s default import settings will work for most users, but you can change them by visiting the Settings » Auto Upload Images page. For example, if you wish to import images wider than 600px, then you will need to change the image size settings.

Next, you need to visit the Posts » All Posts page and select all of your posts so that the plugin can update any external images they contain.

You can only select the posts on one page at a time, so you will make faster progress by displaying as many posts on a page as possible.

You can do that by clicking the Screen Options button at the top of the Posts page.

Changing the number of WordPress pages on a single screen

You need to increase the number in the ‘Number of items per page field’ field to ‘999’ and click the ‘Apply’ button. If you are concerned your hosting provider may not be able to update that many posts at one time, then you can type in a smaller number.

WordPress will reload the page and it will list 999 posts. You can quickly select them all by clicking the checkbox next to ‘Title’.

After that, select ‘Edit’ from the Bulk actions menu and click the ‘Apply’ button.

Edit Multiple Posts at Once With Bulk Actions

WordPress will now show you a ‘Bulk Edit’ box with all selected posts. Make sure you don’t change any of the settings in this box.

Simply click the ‘Update’ button, and the plugin will import any external images it finds in the selected posts.

Updating All Posts in Bulk

Now, if you have more than 999 posts, then you will need to visit the next page to select the remaining posts.

For detailed instructions, see our guide on how to import external images in WordPress.

5. Setting Up Redirects

After successfully merging content from two WordPress sites, the next step is to set up redirects so that users visiting the old site are automatically redirected to the new WordPress site.

You will need to edit the .htaccess file on the old WordPress site.

You can edit the .htaccess file by connecting to your WordPress site using an FTP client or by using the File Manager tool in your WordPress hosting dashboard’s cPanel.

Edit .htaccess file

The .htaccess file is located in the root folder of your website. If you can’t find it, then see our guide on why you can’t find the .htaccess file on your WordPress site to unhide it.

You need to place this code at the top of your .htaccess file:

#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.primarysite.com/$1 [R=301,L]

Don’t forget to replace primarysite.com with the domain name of your primary WordPress site. Then, you need to save your changes and upload the file back to your server.

You can now visit any post URL from your secondary WordPress site, and you will be automatically redirected to the same post on the primary site.

6. Troubleshooting After Merging Two WordPress Sites

Now that you have merged your two WordPress websites, you should make sure that you’re not missing any important data and that your merged site is working as expected.

Here are some troubleshooting steps you can take.

How to Merge and Bulk Edit Categories and Tags

You may want to clean up categories and tags after merging two WordPress sites. For detailed instructions, check out our tutorial on how to merge and bulk edit categories in tags in WordPress.

How to Fix URLs Pointing to the Old Domain in Posts and Pages

All internal links in imported posts and pages will still be pointing to your old site. Since you have redirects set up, your users will still land on the correct post on your new site.

However, you still need to update URLs for improved SEO and better user experience.

Luckily, this is easy to do with the Search & Replace Everything plugin.

For step-by-step instructions, see our tutorial on how to update URLs when moving your WordPress site.

We hope this article helped you merge two WordPress sites together. You may also want to see our ultimate WordPress SEO migration checklist or our expert pick of the best WordPress migration services.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

33 CommentsLeave a Reply

  1. Melody

    Would this be the same as copying the posts and products to the new website?

    • WPBeginner Support

      Similar, this would also tell search engines to go to the new post on your site instead of the old post on the old sites :)

      Admin

  2. micibama

    Thanks for sharing this important guide. I have followed the guide accordingly however, my old site contents are not showing on my new site. They are saying page not found. Do i need to replace all the codes in the .htaccess with the one given above? Please help

    • WPBeginner Support

      You shouldn’t need to replace your entire htaccess unless you have code that would conflict with our recommendation. You would likely want to resave your permalinks to help with the most likely reasons.

      Admin

  3. Keval Padia

    Excellent content. We used to maintain two separate blogs for individual niche and were looking to merge both together without hampering our SEO. These steps are detailed and easy to follow, thanks for writing!!

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Admin

  4. Monique Martens

    Hi there,

    Thanks for this interesting and helpful guide!

    Can you tel us what will happen with pages and posts that have the same name and/or ID number? For example, each website has a home, blog and contact page. Will these be separate pages with the same name?

    Best regards,
    Monique

    • WPBeginner Support

      The posts will have the same name but the slug will be modified to be unique unless they are an exact copy of what you have currently on your site.

      Admin

  5. Keir Briscoe

    I get a 405 error when I try to import. I am the creator and admin for both sites. I am also logged into both sites. I doubt anyone will reply to this message. but though I would leave it anyway

  6. Romona

    Hello,
    If I have a new theme at my new site and new host, where will the pages go and will they automatically adjust to the new theme? By pages I mean (diy, recipes, life, etc). Will I need those exact page headings for it to fall into the correct category or will they all fall together into one category?
    THANK YOU for your help!

  7. Paul

    Hello,

    Very good article! Exactly what I was looking for in terms of merging two WordPress sites. I was curious though if this could be applied on sites with WooCommerce for example?

    Thank you for this well written procedure.

  8. Steve

    I have oldsite.org which has a blog in the root and 2 more blogs at /nytips/ and /nynews/ and a community at /nyforum/ and want to make /nytips/ and /nynews/ a category of the blog in the root so the search box will work for the entire site plus giving me the chance to maintain one blog and one forum. Will this article help or will I have to use oldsite.net first then move it back to oldsite.org?

    Each folder was a domain which I consolidated 5+ years as I did not want to buy SSL certs for each domain and their aliases.

  9. Edmond Chan

    Hi team, thanks very much for this info. I edited my .htaaccess file in my old wordpress site to redirect to the new site. I used the code in the article above. However, I’m not able to access oldsite.com/wp-admin anymore as it redirects to newsite.com/wp-admin! Is there anyway to still access the old site’s admin dashboard to update plugins, wordpress itself or for any other reasons? Many thanks, Ed

    • WPBeginner Support

      Hi Edmond,

      You will need to remove the .htaccess redirect to access old site admin area.

      Admin

      • Edmond Chan

        Hi Team,

        Thanks very much for your reply. The problem is that because the old site admin area immediately redirects to the new site’s admin area, I literally can’t access the old site’s .htaccess file in order to edit/remove the redirect. It’s chicken and egg! Is there any way to fix this?? Many thanks, Ed

  10. ranga

    Hi!
    We moved our content from siteA to siteB both of which use wordpress CMS. After merging the content do we need to change the address in google websmaster tools.? Thanks.

  11. Ilyas

    I have merged my websites and all of the posts are on my new website.
    But When I search an article, still the url and name of my old website my old website appear on the search engine.
    What if I delete my old website or if it expires?

    • Alan

      The best thing is to set redirects up from your old website to your new website and never let it expire.

  12. John

    Thanks for an interesting and useful article.
    I am in process of merging three websites with my older and larger main site. I’ve been doing this manually and it’s taking ages. I didn’t realise it was possible to do it automatically. HOWEVER, one issue I’m facing doesn’t seem to be covered in your article. If I choose “all content” when I export from one site, will that include the comments the posts have attracted? If not, how to export/import comments?
    Many thanks,
    John

  13. Jack

    Would it be ok to redirect single blog posts one by one over a time periode of one year.

    E.g. Every week two blog posts from one blog (the one fizzling out) are republished to the main focus blog. And 2 redirects are done every week for a year.
    This process goes on until all are moved to main blog (say 100 posts over a year). Would that be a bad idea in teems of SEO?

  14. Chris

    Hi Folks,

    With a merge, what’s the situation about page/post IDs? If we are dealing with bigish sites surely there is a chance the page ID will be duplicated on import? Will that cause problems, and if so how to avoid/fix it?

    Cheers,
    Chris

    • Jack

      Would it be ok to redirect single blog posts one by one over a time periode of one year.

      E.g. Every week two blog posts from one blog (the one fizzling out) are republished to the main focus blog. And 2 redirects are done every week for a year.
      This process goes on until all are moved to main blog (say 100 posts over a year). Would that be a bad idea in teems of SEO?

  15. Gemma

    Hi,

    I’m curious to know, when importing the OLD site into the NEW, will it adopt the theme settings of the NEW site automatically?
    How can I make sure they match?

    Thanks

  16. Melissa

    How long before you could delete the original WP site?

    • WPBeginner Support

      Once you are satisfied that the old site is no longer getting any traffic, you can delete it. However, if the original site is still getting significant traffic from sources other than search engines, then you may want to keep the domain up as long as possible.

      Admin

  17. Karakaplan

    How long should keep Redirect htaccess file in old server?

  18. Alan

    I’d like to import one websites posts into a particular category or custom post type. Then a different redirect will be needed. Can you make a tutorial fo that?

  19. Valentine

    Thanks for this information. I’ve successfully merged my two sites and they are working properly from one dashboard. Nice Job

  20. Georgina Moon

    This is interesting and helpful. But I have the opposite question – I want to start a new Wordpress blog, and export only certain posts to the new blog (e.g., all my posts with certain tags or categories, such as Greece, sailing etc). I have laboriously been copying and pasting, but I have to add the photos again, plus tags and categories. Is there a quicker way, please?

    • WPBeginner Support

      Hi Georgina,

      Yes, you can do this here is how.

      First create a new category in WordPress, you can all it anything you want.

      Next, you need to go to Posts -> All Posts screen. Click on screen options button at the top right corner. Under ‘Number of items to show per page’ enter a number larger than total number of posts on your site then click on Apply button.

      WordPress will now load all your posts on the same page. Check the box next to the posts you want to move. Then select ‘Edit’ from ‘Bulk Options’ drop down menu and click on the Apply button.

      A box will appear with a number of options. Simply select the category you created earlier to file all selected posts under that category. Click on update button to save your changes.

      Now you can go to Tools -> Export page. Select posts and then under export settings select the category that has all the posts you want to move.

      Admin

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.