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!

Get New Posts in Your Inbox

This field is for validation purposes and should be left unchanged.

About Matt Whiteley

Matt has been building bespoke WordPress websites for over 10 years specializing in the Genesis Framework. He integrates Advanced Custom Fields heavily in all builds, especially with the new Gutenberg Block Editor, allowing clients to easily modify all aspects of the their website with ease.

He works with a wide variety of small businesses and agencies across the country providing development services as well as hosting and maintenance. When he isn't coding he enjoys spending time with his wife and two children, golfing and playing poker.

Reader Interactions


  1. Brian says

    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.

    • Matt Whiteley says

      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.


    • Matt Whiteley says

      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. Amy says

    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

    • Matt Whiteley says

      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!



    • Matt Whiteley says

      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. Alastair says

    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?

    • Matt Whiteley says

      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!


    • Eric Cicero says

      I had this same issue as well. All of the blog content imported except the media. After the import I received “Failed to import Media” notifications.

      I know this would be very hard to debug but any updates on this issue would be greatly appreciated!

  4. cory says

    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?

    • Matt Whiteley says

      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!


    • Matt Whiteley says

      I’ve used it as recently as two weeks ago without issue. Sorry it isn’t working for you. Maybe contact the plugin author if you’re having issues.

  5. Jay Zippo says

    I have exported and imported 100 blogs in my days and NEVER have I been successful in bringing the media over. I can do the sub “year” folder transfer and that takes care of the media in the content, but the featured image has never, on any server, at any time, imported to the blog. I have tried multiple plugins and different exports / imports, but it always results in an empty “featured image” for each blog post. Clicking the “media” option in the export does NOT do anything. It never has. So needless to say, you did not answer any of my queries with this post. Thanks anyways.

    • Matt Whiteley says

      I have also migrated over 100 blogs in my day and this plugin has worked wonders to include featured images. I will admit I haven’t used it in a few months, but as of Feb/Apr 2018 I used this without issue. Doing it in batches to have smaller import sizes helped. Leaving a snarky comment because you can’t get it to work isn’t going to help you out…

  6. Ed Miller says

    This works for me, but I have to do it in one-month chunks due to server timeout (which is a pain as I have a 10-year archive!). It will allow me in larger portions, but I have to run the importer once or twice over on the same file to get it going.

    • Matt Whiteley says

      Yep, same here. Depends on your hosting provider and how well their server performs as well. I’ve always found smaller chunks is the safe way to go (but can be a bear if you have that many posts!). Glad it works!

  7. Robert says

    Even though this plugin has not been updated over 2 years ago, this did successfully work for me. This guide was easy to follow and right down to the point.

    I am moving my WordPress website from a self-hosted to now being on WordPress servers in which this did successfully work.

  8. Faizan Saeed says

    Its 16-10-2018 I have tested this plugin with my latest word-press site and works like a charm all posts with their relevant featured images are shown plus its download the featured images in word-press folder. I have import and export 100 posts.


  9. MikeLipenkranz says

    This plugin didn’t do anything as far as I can tell. What I ended up doing is going directly to the database tables (via PHPmyAdmin) and exporting the SQL for wp_posts and wp_postmeta. I exported “Structure and Data”, “Add ‘drop table'”, and “Complete Inserts”. Then I did a search and replace in the resulting SQL file for the old/new domain. Then I ran the SQL in the new WP database. That is the only way I could restore featured images. The images were uploaded via FTP. Then I use a plugin called “Add from Server” to essentially re-import the images into the media library. It’s a lot of work.

    • Matt Whiteley says

      Seems like this plugin is hit-or-miss sometimes. I have personally never had any issues, but a lot of others have. Lots of work using your method but if it got the job done, great! I’ve used “Add to Server” many times in the past to get media uploaded via FTP in to the media section – great tip there. Cheers!

    • Matt Whiteley says

      Your best bet is to reach out to the support for the plugin. Could be a plugin conflict, outdated version or WordPress, theme conflict, etc…lots of variables.

  10. Erkan says

    Hello, i am trying to use this plugin, it is working perfectly with small data’s, but i have 7500+ posts and just my uploads folder images 7gb. when i try just posts author by author or date by date or category by category i got error browser “Tmeout” i changed my php.ini max limits even my timeout limit now 0 mean limitless, my wordpress 4.9.8 and my php version 7.2. , i am trying to export my posts with deatured images. Can you help me? Do you have any solutions or any idea?

    • Matt Whiteley says

      I would suggest doing them in very small batches. Like 1-2 months at a time. That will help with the timeout issues. Outside of that you would want to reach out to the plugin author for support. Best of luck!

  11. Na says

    I just used this method and it broke my site.
    I downloaded the plugin and imported only a few posts to test this and now my entire website won’t even load.
    Has this happened to anyone else?

    • Matt Whiteley says

      It works like the default WordPress import/export. It will give you an option to import users or assign posts to other users. It will import categories.

  12. Nancy Durkee says

    So funny to find this when I was looking to move the featured image for my client. You saved me again Matt! You are awesome!

    • Matt Whiteley says

      Small world! Glad it helped (hope it works – it is a bit dates but still seems pretty stable!

  13. Puneet says

    Only the posts were imported without any media and featured images. No error as well while importing.

  14. Michy says

    what if all you have is the GIANT export with media images but you didn’t do it in batches and you don’t have access to the old blog anymore to do that.

    I keep timing out if I try to add images. Am I out of luck and just have to do 10 years of images again?

    • Matt Whiteley says

      Hey Michy. Your best bet would be splitting up the XML file in to smaller files (you’d need top open it up in an editor and carefully create multiple files). It would be tedious, but may do the trick for you.

  15. Walter says

    My problem is I have to move a WORDPRESS.COM website. So i cannot install any new plugin unless i pay 300usd a year.

    So i can only try stuff with the import feature in the new server or with the xml files.

    Is there anyone who can help? Thanks!

  16. viv says

    You can only export posts OR media. You cannot export both at the same time. Do you have an updated solution?

    • Matt Whiteley says

      I used this method about two weeks ago and it worked fine for both…but, a much more robust solution is WP All Import / Export PRO. It isn’t free, but works great.

  17. Gina Oliver says

    Hey! Great article/very informative however I have a more personalized questions that I wonder if you can answer… I already have a domain name & host using wix & godaddy but I want to create more customized blog posts… is it possible to just use wordpress for blog creation alone & then transfer those blogs over to my wix site? I’m just trying to sort through the best option in combining wordpress & wix… thanks in advance!!

    • Matt Whiteley says

      Hey Gina,

      Sorry for the delayed response. I don’t use Wix for anything so I don’t think I’d be of much help. Maybe reach out to Wix support and see if this is doable!



  18. Alain says

    Thanks for this tutorial. When I try to export I get 502 Bad Gateway error after a little while. Why is that?

    • Matt Whiteley says

      Hey Alain,

      My first guess would be maybe you are exporting too many posts at once. Try limiting the number of posts by selecting a smaller date range.

      Best Regards,


  19. Ryan says

    I’m having the same issue as others where if you select a date range the XML file doesn’t include the posts but if you don’t select a date range it works fine. It’s annoying but you can still open the XML file and split the posts up into multiple XML files manually to avoid timing out during upload.

  20. Vincent says

    Hello Math,

    I tried the plugin. But exporting gives files of only 3kb. I followed your tutorial exactly. Is this a familiar problem?

    Kind regards, Vincent

    • Matt Whiteley says

      Not that I am aware of. I literally used this method to move roughly 300 posts two weeks ago and didn’t have any issues. A 3kb file sounds like it isn’t exporting any content, so check your date ranges maybe.

  21. Dan Atrill says

    Thanks Matt. This has been a frustration for ages. Maybe I wasn’t Googling the right term for Importing Featured Images into posts. Anyway, it works and it was really quick and I’m very grateful. 🙂


Leave a Reply

Your email address will not be published.