Help improve Learn WordPress for everyone - fill out the individual learner survey today.

Tools: Import and Export


In this tutorial, we are going to look at how to export and import data from one WordPress website to another. Maybe you want to export your WordPress website to a different hosting company or merely create a copy of your website.

Learning outcomes

  1. Use the import and export tool.
  2. Save and upload an XML copy of your site.
  3. Identify that exports will not include your plugins or themes files.

Comprehension questions

  1. Why do you need to export your site?
  2. Have you considered using a migration plugin?

Transcript

Hi, and welcome to Learn WordPress. Today we are going to look at how to export and import data from one WordPress website to another. To put it differently, you can use the import and export options to find a new house for your content on WordPress.

If you decide to export, your site’s content is downloaded into an XML file that you can then import to another WordPress site. If you’re ready to export, make your way to Tools and then click on Export. Now at the top, it actually gives us a really clear explanation. It says when you click the button below WordPress will create an XML file for you to save to your computer. This format, which is called WordPress eXtended RSS or WXR will contain your posts, pages, comments, custom fields, categories and tags.

Once you’ve saved the downloaded file, you can use the Import function in another WordPress installation to import the content from the site. Below is an option to export all content, and this will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts. Or you have the option to only export your posts or only pages or only media. I’m going to select All content and then click on Download export file, and now we can go ahead and save the XML file to our computer.

This is a fresh installation of WordPress with no posts, no media and no pages, and I would like to import the XML file from our previous site into this new site. So make your way to Tools and click on Import, and we are after the WordPress Importer right at the bottom. So let’s go ahead and click on Install now, and when it is installed successfully, we can click on Run importer. And now, we can choose the XML file that we exported from our other website and then click on Upload file and import. To import media successfully, remember to select Download and import file attachments. Please also note unattached media in the Media Library that has not been embedded into a post or page will not be included in the XML export file. Now we can go ahead and click Submit, and this may take a few seconds. And now we can go and check out everything that has been imported.

So let’s make our way to posts. Here are all the posts from my other website, all the media, all the pages, all the comments to posts, and because it’s the same theme, we can make our way to the Site Editor, and we’ll notice that our navigation menus as well as our templates, and our template parts, have been transferred from our old website. If the website you’re importing to has a different theme than the one you’re exporting from, you will first need to install and activate the original theme on your new site.

Please note, when you transfer content to a new website, it does not include the site’s design, themes or plugins, but you can use a migration plugin for that if you were interested in transferring the entire site.

When you go to Import, you would have noticed there are other systems you can import posts or comments from, such as Blogger, Live Journal and even Tumblr. There is also an option or plugin to convert existing categories to tags or vice versa.

Happy exporting and importing and visit Learn WordPress for more tutorials and training material.

Workshop Details


Presenters

Wes Theron
@west7

I am an Instructional Designer for the WordPress open-source project sponsored by Automattic. I am a strong supporter of the open-source movement. I have a background in education and content development. I am a husband, father, dreamer and lifelong learner.