Migrating content and posts to another website is a dilemma that many WordPress users have to face at least once in a while. The process of copying specific pages and posts over to a new site involves copying all table rows from one database to another. Copying data directly using a database management tool such as PHPMyAdmin requires good knowledge of MySQL and complete understanding of how databases operate.
Fortunately, there’s a more practical solution for exporting posts. By using the official WordPress importer, you can easily export content to another website using an XML file. It allows you to move pages, posts, custom posts types, comments, custom fields, post meta, tags, categories, and even authors.
This article will guide you through the complete process of exporting and importing content between two WordPress websites. The procedure is quite simple and does not require any technical knowledge.
- Why you Might Want to Move your WordPress Blog Posts
- The WordPress Export Tool
- How to Export WordPress Posts with Images
- How to Export Specific Blog Posts in Different Categories
- What to Consider when Exporting WordPress Posts
To export data successfully, you need to have access to both websites. Also, we recommend that you make a backup of the database of both sites so that you’ll be able to restore them later in case anything goes wrong.
Why you Might Want to Export your WordPress Blog Posts
Here are 4 reasons that you might want to import and export WordPress content between your blogs:
It’s quite common that you find yourself blogging about different niches; we all have different interests. But if you do unrelated niches on the same blog, then you may face problems in SEO, creating & targeting an audience, among others.
You might be blogging (on different blogs) about many sub-niches of the same niche. For that purpose, you’ve decided to consolidate your efforts for niche dominance.
Whether you’re changing your domain for branding or only running away from huge SEO penalties, the need for a domain change will undoubtedly require you to export your WordPress blog’s content.
Prevent Work Loss
Your blog can have a considerable chunk of past unrelated content (posts) that might hurt your new niche’s effort. However, instead of deleting these old posts and wasting your efforts, it’s a good idea to find a new home for them.
The WordPress Export Tool
WordPress has its own built-in “Export” tool, which can be found in the main “Tools” menu. The tool consists of two options – first you can “Export” your content from one site and then “Import” into another. But depending on why and what you’re exporting, you may not need the import option at all.
Keep one thing in mind that this tool is specially designed for moving content from one site to another. It’s not suitable if you’re changing your domain name. The WordPress export tool is not suited for migrating hosting companies because you need both old and new sites to be up and running at the same time.
You’ll also need to spend a bit of your time on fixing your WordPress settings because none of your settings (plugins, themes, or WordPress itself) will be transferred over.
How to Export WordPress Posts
After choosing the export tool, you’ll have a few options.
What you’ll see here also depends on which plugins you’ve installed. But typically, you should leave the default option selected “All Content” and click on the “Download Export File” button.
DANGER! Where are my Images?
It’s crucial at this point to understand precisely what you’re downloading. The file you’ll get from this whole procedure will be a “.xml” file. It’s a text-based format containing a lot of data.
This file includes all the text of your post, and it will have all the headings, categories, links, date it was created, author, etc. as well. But it will not include any of your media/image files. There will be a link to those media files, but not the actual files.
Important Tip: Don’t get fooled by the “Media” option under “Choose what to export”. It doesn’t allow you to export the actual media files either. In fact, it only exports a .xml file containing links to those media items.
How to Export WordPress Posts with Images
If you’re using the tool for what it was designed for – then you don’t have to export the image files themselves as this will be covered by the import tool.
The import tool asks you different kinds of questions about how you would like to import the data you’ve exported. One of the options is “Download and import file attachments”.
If you choose that option, it will fetch the images from your old site. Now you’d need to add them to WordPress “Media Library”, then update the photos in your posts so that they can load from your new website.
If you don’t select that option, the images will still be loaded from your old site. As a result, when you shut that site down, all of your pictures will be broken on the new site.
That’s why you’d need both the new and old sites to be up and running during the complete import/ export procedure.
What if you Need the Media Files too?
If you do need the images/ media files with the exported .xml file, the best way is to zip the entire file /wp-content/uploads/folder and download that.
Just keep in mind that there might be a lot more embedded images than you were expecting, since each time you upload the image to your site, WordPress automatically creates copies of it in various sizes, e.g. thumbnails and full size images.
You will need to use the file manager within your cPanel to handle all of this.
How to Export Specific Blog Posts in Different Categories
If you’ve got specific posts that you want to export in a particular category, all from the same author, then what will you do?
To put this into context, let’s say you have ten blog posts and want to export only 4 out of those 10 posts.
Simply go to “Users > Add New”, then create another dummy User with the role of Author. You can name it anything you want. After creating a dummy email, generate a password and save it.
After creating a user, go to all the specific posts you want to export and change their Author to the new Dummy one, i.e. go to “Posts > All Posts”.
Next, find the post you want and click on the “Quick Edit” option just below the title. Then locate the “Author” option and switch it to the Dummy one. Don’t forget to “Update” the changes. Do this for all the posts you want to export.
When you’re done with this, go back to “Tools > Export” and select “Posts”, but under the new Author specification (the Dummy Author). Also, don’t forget to tick the “Export media with selected content” checkbox.
After that, click on the “Download Export File” button; and congratulations, you’ve done it!
What to Consider when Exporting WordPress Posts
- If you’ve got a lot of different blog posts, the right idea would be to export your posts in a few batches. To do so, you can change the date range during the export process and import the files into their new location.
- You can use different plugins to export blog posts from a WordPress website.
- While importing/ exporting posts, don’t forget to assign authors to them, so that the posts on your new site are consistent with the ones on your old site.
- Another thing is you should move the images embedded into the content via FTP because they matter as much as the featured images. While you’re at it, make sure that the URLs to the images are correct.
With WordPress importer, you can migrate all content from one website to another. But genuinely speaking, it’s not an ideal solution to relocate a full website since all your settings won’t be transferred.
Also, it’s worth mentioning that the WordPress file upload limit is applied to the WordPress importer. The default value defined by most hosting providers, is 8MB, and sometimes 2MB. This can be a problem for you when you’re importing a large number of posts and pages.
In order to resolve this, you’ll need to increase the maximum file upload limit. This can be done by contacting your hosting company to increase the file upload limit as you want.