Helping you build a better website
(and other interesting web stuff)

CSSHTMLJavaScriptjQueryMSSQLMySQLPHPSilvaTechnologiesWordpress
Silva Web Designs - Blog

How to Import and Export posts from one website to another

Migrating content from one website to another website can be a headache you may face at some point. Copying specific posts and pages over to a new 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, a more practical solution exists. The Official WordPress Importer allows you to easily export content into another website using an XML file. It allows you to move:

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

In this post, I will walk you through the process of exporting and importing content between two WordPress websites. The procedure is simple and does not require any technical knowledge.

You need access to both websites in order to migrate the content successfully. Additionally, I strongly encourage you to take a back up of the database of both websites so that you can restore them if something goes wrong.

Exporting Content To Another Website

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.

There are three options available. The first option backs up all content including posts, pages, comments, custom fields, categories and tags.

Alternatively, you can choose to only export posts or pages. You can filter what is exported and only export content from particular categories, authors, date range and publication status.

The export function will also list any other post types that your website uses. For example, I use the Ninja Popups plugin on my personal blog to display pop up messages. As this is a custom post type, WordPress gives me the option of exporting the content for that post type to another website.

Once you have decided what content to export, save the XML export file to your computer.

Importing Content From Another Website

The WordPress import options can also be found in the main admin menu under tools. Import functionality is not built into the WordPress core, however, there is a good reason for this.

In total, WordPress provides eight official import systems. Therefore, WordPress offers these import systems as plugins so that the core version of WordPress is not bloated.

As we are importing from another WordPress website, we need to install the WordPress installer. You can do this by clicking 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 then be given the option to assign imported authors to exist authors on your website. This is useful if the same authors exist on both websites. Alternatively, you can 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.

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 information will be identical to what it was before. Therefore, posts and pages will have the same publication date and be assigned to the same categories.

Nathan da Silva - Profile

Posted by: Nathan da Silva

Nathan is the Founder of Silva Web Designs. He is passionate about web development, website design and basically anything digital related. His main expertise is with WordPress, Magento, Shopify as well of many other frameworks. Whether you need responsive design, SEO, speed optimisation or anything else in the world of digital then get in touch. If you would like to work with Nathan, simply drop him an email at [email protected]

It’s good to share

Join the discussion