I'm trying to migrate my self-hosted WP blog to WordPress.com, images included.

Originally images were hosted on various image-hosting websites, but I've used this plugin to cache and upload them to my self-hosted WP media library. Now posts have image tags in this format:

<img src="http://mywebsite.com/wp-content/uploads/2012/02/2033_l.jpg" alt="" />

I've exported my blog to XML, and used the import tool on WordPress.com. The blog is imported fine, and all images have been added to WordPress.com media library.

However, image urls in each post still link to my self-hosted (old) blog.

I've contacted their support regarding this issue, and they say I have to change each of the 650~ image urls manually.

Is there an easy way of doing this? I can do a search & replace on the exported XML file, but there must be some easier way of importing the urls correctly.

  • Close-voted as off-topic. Questions about wordpress .com are out of scope, for practical reasons (code can't be altered; can't install Plugins, can't access DB, etc.) Commented Feb 18, 2012 at 23:40
  • @Chip Bennett My question was about what to do before importing to .com, of course.
    – Ory Band
    Commented Feb 19, 2012 at 10:16
  • The thing is, I've never seen what you're describing happening for images that are actually attached - that is, images that have been added as attachment post-types. Are you sure that the Plugin you used actually adds the erstwhile external images to the WP DB? Commented Feb 19, 2012 at 13:50

2 Answers 2


I eventually used this plugin to download and cache all images locally, and replace all links to the local ones.


At .com, you can't use plugins or access the database to run queries to change the URLs. So yes, export the XML, find/replace and then reimport the XML file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.