Move WordPress blog posts with featured images

Over the years I have been asked to move WordPress blog posts many times. The most frequent need for blog post migration is during the development of a new site where the client needs to keep all blog posts, but has no need for other things from the old site. Instead of migrating the entire live site database, it is much cleaner to ONLY move the blog posts so all the other extraneous database stuff (pages, plugin data, other meta data) doesn’t clutter the new site’s database.

The simplest way to migrate blog posts is to use the built-in WordPress export/import functionality. It works very smoothly and is simple to do. The problem is, when you export ONLY posts, or anything less than “All Content”, the featured images are not included with the export.

For sites with a small number of blog posts you could always manually add the featured images, but that is tedious. Plus, for sites with a significant number of blog posts, this can prove to be a very large task. So, here is a quick and easy way to migrate blog posts while keeping featured images in place.

Exporting the Blog Posts with Featured Images

  1. Install the following plugin on the site you will be exporting the blog posts from and activate it:

  2. Go to ‘Tools -> Export’ and select ‘Posts’ and check the ‘Export Media with Selected Content’ as pictured below:

    Move WordPress blog posts with featured images

  3. Click the ‘Download Export File’ and save it to your desktop.

Importing the Blog Posts with Featured Images

  1. Go to the new WordPress installation that you’d like to move the blog posts to and go to Tools -> Import.
  2. Choose WordPress and install/activate the WordPress Importer plugin.
  3. Import the file you saved to your desktop in step three and you’re all set!

With the help of this simple plugin you can easily migrate blog posts while keeping the featured images in place. Here are a few tips to keep in mind:

  1. If you have a large number of blog posts it is good to export them in batches to avoid timeouts. I suggest doing them in 3 or 6 month batches. You can do this by changing the date range during the export process and then importing the files one by one on the new site.
  2. Be sure to properly assign/import the post authors when importing. This will ensure all authors for your posts remain consistent with your previous site.
  3. Make sure to move any images that are within the content of the post to your new site via FTP and ensure the URL to that image is correct. You can move the entire wp-content/uploads folder to ensure all images stay in place, but I prefer not to do this so the new site is as clean as possible.

Hopefully this simple tutorial can help you save some time on your next migration. If you have any questions or tips, leave them in the comments below!


  1. The plugin does not work for me. When I click to export the file it does not download, it just kicks me to my site’s homepage.

    • I haven’t used it for quite a while so it is possible the plugin needs updating. Or it could be a conflict with another plugin, or an issue with your site or host. I would suggest enabling the PHP debugging and see if it outputs any PHP errors when you export the file. That would be a good starting point.


    • Are you sure you have posts in the range that you’re trying to export? Exporting by date range is how I’ve done it on multiple sites with a large number of posts to ensure the export doesn’t time out.

  2. I have imported all posts into the new blog (new site) successfully but I was not given the option to import the media. The images are showing up but I believe they are still being hosted on the old site (new site is still on my machine – localhost). If I import all the media from the old site is there a way to have the new blog pull from newly imported files? Thank you

    • Hey Amy,

      There is no “import media”. It is exported using this method and automatically imported when you import the file in to the new site.

      To check if the image is looking at the correct site you can go in to a browser like Chrome or Firefox, right click on the image and click ‘inspect element’. Take a look at the URL and see if it is pointing correctly.

      You could move the entire ‘uploads’ folder over…but that won’t attach the images as featured images like the method in this post will. With that said, if you do have images within the body of your posts, you will need to move the uploads folder and also do a find/replace to swap out the URL on those images to point to the correct URL.

      Hopefully that all makes sense!



    • Without looking at your setup I don’t know that I can be of much help here and since it’s on your local machine I can’t do that. I’m not sure what that URL is and how your local install is setup so it could be fine, or you may have done something wrong. :-/

  3. Would really appreciate your help – tried to use this but when I import in the new site it says all images have ‘failed’. They’re all feature images – any ideas?

    • Hey Alastair,

      Unfortunately, this probably isn’t something I can help with. There area variety of things that could cause this. Your hosting/server setup, possibly the files are already where you are importing them, the import may be timing out. I would suggest reaching out to your hosting provider or posting a message on the plugin support forums for some guidance from the plugin developers.

      Best of luck!


  4. If i enable the “Export media with selected content” option when i go to export, the downloaded file is 0 bytes and empty. if I uncheck “Export media with selected content” in the export screen, i get a good xml file. is there anything that can be done to fix this?

    • Hey! You’d probably want to first try deactivating other plugins and see if it works to see if there is a plugin conflict. You could also make sure all your plugins/themes and WordPress are up to date. As a last resort you’d want to reach out directly to the plugin developer to explain what is happening. Without knowing your setup I don’t know that I would be too much help on this one! Cheers!


Leave a Reply

Your email address will not be published. Required fields are marked *