Export / Import content from one WordPress site to another

You are here:
Estimated reading time: 3 min

This article describes how to move your content from one installation of WordPress to another.

I tested this method on my local computer and on my server and it turned out unreliable to move your images from your media library and the featured images. I tested out several things even exporting/importing the images separately with no success. The content was moved properly without any problems.
How to move content between WordPress Sites

Installing the exporter

If this is your first time exporting the content you will have to install the plugin. It’s very easy just go to the left side menu of the dashboard, click on Tools > Export.

Tools > Export

If the tool is already installed you will get a page like the one below. In this example you will only see “Posts, pages and media” available to choose separately but depending on what you have installed on your site the list of content will vary.

Export screen

Sample below of what the exporter of my site shows.

Export screen on solybarr.com

Exporting your content

From the export page select “All content” and then click on the blue button that says “Download Export File”. This will save a file with an .xml extension in your computer. This file includes all content and images.

Export screen

Let’s check what content (posts/pages) we are moving.

Posts in original site

Pages in original site

Installing the importer

On the destination/final site you will go to “Tools > Import” from the left side menu in the dashboard.

Tools > Import

If it is a new site and you’ve never run the importer before you’ll need to install it.

Install the Importer

Next, after the installation process completes, click on the Run Importer button to be taken to the Import page.

Run Importer after install

Importing your content

Get your file with the .xml extension and click on the “Upload file and import” button.

Select file and click Upload file and import

When choosing the file with our computer we can get a peek of the contents and some of the instructions.

Selecting the XML file

The next screen will prompt you to choose a user from this website to “own” all the posts and pages. Basically this means each post and page has to belong to someone in the WordPress installation so you need to assign them or create a new user for them. You will check the box that asks to import attachments.

Assigning users

Next we get a response from WordPress. In my tests WordPress failed to import the featured images of the posts and pages. I tried several things to troubleshoot this (read about it in the last step of this document “Problems & Troubleshooting”).

Import results

Verifying your imported content

A very important step is to check if the content was successfully transferred. In my example I could see duplicate pages of the base WordPress pages (Privacy policy and Sample page). Aside from that all the pages were imported, same with posts.

Setup home page

On the front page of your site you will be able to see the pages and posts that have been imported (unless you’ve created a menu already – you can follow the article “Create and Add menus to your WordPress site” to learn how to do that).

Home page with imported content

Problems & Troubleshooting

So during my demo, I got an error “Failed to import Media”. I checked the posts and pages and realized what were missing where the featured images for posts and pages. The images used inside the posts were imported correctly, but there were no media files in the Media Library.

I searched google and got different responses of what the problem could be. A short summary of possible issues:

  1. The media files were too big.
  2. A plugin might be interfering.
  3. The theme installed might not support featured images.

In my case the first two were not applicable as I had three images less than 100K each, and no plugins installed since it was a fresh install of WordPress.

Here is what I tried:

  1. I changed the theme to be the exact same in the source site and the destination site to no avail.
  2. I also tried exporting/importing “only” the images and that still gave me the error.
  3. I did the export on a real server instead of on my local computer.

All of these still gave me the same error message.

So my advice is to use this only if you want to move posts and pages but do not rely on it for image transfer as it is faulty.

Thank you for reading.

Was this article helpful?
Dislike 0
Views: 50