Importing Posts and Pages from One WordPress Site to Another

Moving your content to another website is a headache many WordPress users face at one time in their life. Copying specific posts and pages over to another website involves copying table rows from one database to another. Doing this directly using a database management tool such as PHPMyAdmin requires knowledge of MySQL and a good understanding of how databases operate.

Thankfully, an easier way is available using the WordPress Importer allows you to easily export your content to another website using an XML file.

Using the WordPress Importer will allow you to move:

  • Posts, pages and other custom post types
  • Comments
  • Custom fields and post meta
  • Categories, tags and terms from custom taxonomies
  • Authors

Now before you start you need to make sure you have access to both websites in order to migrate the content successfully. The procedure is easy and doesn’t require any technical knowledge. I also would encourage you to make a backup of the database of both websites so that you can restore them if something goes wrong.

Exporting Your Content to another Website

Now this is the easy part since the core version of WordPress (i.e. with no plugins installed) has export functionality built-in. You will find the export feature in the main WordPress admin menu in the Tools section.

Use the Export option in the Tools menu so that you can back up either only posts and pages, or use it to back up all content including posts, pages, comments, custom fields, categories and tags. The export function will also list any other post types that your website uses. Once you have finished deciding what content to export, save the XML export file to your computer.
Importing Your Content from another Website

The WordPress import options can also be found in the Tools Menu, however unlike with the Export option, the Import functionality is not built into the WordPress core, there is a good reason for this.

In total, WordPress provides eight official import systems (many unofficial importing plugins are also available). Therefore, WordPress offers these import systems as plugins so that the core version of WordPress is not bloated.
Since you are importing from another WordPress website, you need to install the WordPress ImporterWordPress Importer, you could also click on the WordPress link on the import page. This will bring up a pop up box that allows you to install the plugin directly through your website.

Once the plugin has been installed and activated, you will be taken to the import page. This is where you upload the XML file you exported earlier. You will be given the option to assign imported authors to existing authors on your website. This is very useful if the same authors exist in both websites. You could also create a new account for each author’s posts.

This page also has an option for downloading attachments. When you select this, WordPress will attempt to import all of the images that are attached to the posts and pages you are importing. So that’s pretty useful as it will save you quite a bit of time.

And that’s all there is to it. Your content will now be imported into your website. You can verify this by checking your posts and pages. All of the information will be identical to what it was before, including publication dates and they can be assigned to the same categories.

While you can use the WordPress Importer to migrate all content from one website to another, it’s not the ideal solution for transferring a full website to another location since your website settings will not be transferred.

Also you need to keep in mind that the WordPress file upload limit is applied to the WordPress Importer. This default upload value is defined by your hosting company, so I would suggest you check what yours is before undertaking a transfer of larger sizes. One way to address this issue is to increase the maximum file upload limit. You can do this in a number of ways including modifying your theme functions.php file, modifying your .htaccess file, and editing the php.ini file. Don’t worry if all of this seems too technical, the better way if you are confused is to ask your hosting company to increase the file upload limit for you. If they refuse then you should probably review your hosting situation, or fins a company that wont give you the runaround.

If any part of the import process go wrong like importing the wrong content (trust me it happens), you can just restore the importing website using the backup you made before beginning the whole process. This will allow you to start the import process from scratch and ensures that everything goes the way you want it to.

Share This