Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Merge Two WordPress Sites Together Without Losing SEO

Recently, one of our readers asked us how to merge two WordPress sites together? Sometimes you may create multiple WordPress sites but later want to merge them together. WordPress comes with built-in tools to easily do this. In this article, we will show you how to properly merge two WordPress sites together.

How to merge two WordPress sites together

Why Merge Two WordPress Sites Together?

There could be a lot of reasons for merging two or more WordPress sites together. You may want to start a new WordPress blog by combining your old blogs so that you can have all your content on one location.

Another reason could be that one of your blogs is not doing so well, and you want to merge its content with one of your primary blogs.

Most users merge WordPress sites to spend less time on maintaining a separate WordPress install. Instead of running, marketing, updating and keeping WordPress backups of two or more sites, you can focus on maintaining and growing just one WordPress site.

Let’s take a look at how to easily merge WordPress sites together.

Exporting Content From Old WordPress Site

For the sake of this example, we will say that you have a WordPress site at http://oldsite.com and you want to merge it with http://newsite.com/.

Important: Don’t forget to create complete WordPress backup of both your websites. This will come in handy in case anything goes wrong and you want to revert back.

First, you need to visit Tools » Export page inside the admin area of your old WordPress site. This is the site that you want to merge with the newer site.

Export content from your old WordPress site

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

WordPress will now prepare an XML file and send it to your browser. You need to save this file on your computer as you will need it in the next step.

This file will contain the following:

Merging Content on New WordPress Site

Now that you have exported content from your old site, it is time to merge it with your new WordPress site.

Head over to the admin area of the destination site (the site where you want content to be merged) and visit 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, you need to click on the ‘Run Importer’ link to continue.

Run WordPress importer

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

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

Upload WordPress import file

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

WordPress will now upload your export file and analyze it. After that, it will redirect you to 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 under ‘Import Attachments’ option to import media attachments from your old WordPress site.

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

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

WordPress import finished

Setting up Redirects

After successfully merging content from two WordPress sites, the next step is to setup 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 cPanel.

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 .htaccess file on your WordPress site to unhide it.

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

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

Don’t forget to replace newsite.com with the domain name of your new WordPress site. Save your changes and upload the file back to your server.

You can now visit any post on your old WordPress site, and you will be automatically redirected to the same post on the new site.

Troubleshooting After Merging Two WordPress Sites

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 import missing images?

For that you will have to temporarily disable redirect by editing .htaccess file and removing the code you added earlier. After that you can follow the instructions in our guide on how to import external images in WordPress.

Don’t forget to setup redirects again after importing your images.

Fix URLs pointing to 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 setup, 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. 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 step by step WordPress SEO guide for beginners.

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.

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

    • 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

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

    • 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

  2. 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!!

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

    • 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

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

  5. 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!

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

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

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

      • 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

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

  10. 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?

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

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

  12. 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?

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

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

    • 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

  15. 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?

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

  17. 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?

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