How do I fully migrate post images from one WordPress site to another?

I know WordPress has a built-in tool for exporting content, but this does not actually export images associated with each post…it only exports an XML file. How do I actually export images in each post and upload them to my new WordPress site?

Related posts

Leave a Reply

1 comment

  1. The XML file you export will include references to the images, including a full URL. If the assets are actually available at that URL when you import the XML file, WordPress will automatically download them and add them to your new site’s media library.

    This gets tricky if the site you’re importing from isn’t publicly available via http. If that’s the case, you can move the assets to someplace that is publicly available, and find-replace the relevant domains in the XML file before importing.

    What you won’t get (at least, I don’t know how) is a bundle of content and files in a single package. You might try looking for a plugin that does this, but I couldn’t find one with a cursory search.