When you use the basic WordPress XML Export/Import tool to migrate blog posts between two WordPress sites, their featured images will likely not be included, as silly and counterintuitive as that sounds. In this post by Morten Rand-Hendriksen, he offers one possible solution: “Instead of setting Statuses to ‘Published’ I set it to the default ‘All Statuses'”. Recently (on Feb 7, 2017) I tried doing just that though, and the featured images still were not exported. After some searching and trial and error, this is the solution that ended up working for me:

  1. Use the WP Export/Import tool to migrate the posts, knowing that the featured images wont’ be included.
  2. Install and use the Export Featured Images plugin on the site the featured images are coming from. After activating, you’ll need to go to Tools > Export Featured Images and choose which post types to include. It will export an XML file that you can import into the other site using the WP Import tool. Then just do a spot check on your posts to make sure their featured images have been both imported and attached to the correct posts

 

Another possible solution would have been to export ‘All content’, which does include featured images, then manually edit the XML file and delete everything you don’t want included. This is tedious and prone to error though, so I wouldn’t recommend it.

Beyond the things mentioned above, a more robust migration script could be used, but that seems like overkill to do something as simple as migrating Posts from one WordPress site to another.

Leave a reply

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