Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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.) –  Chip Bennett Feb 18 '12 at 23:40
    
@Chip Bennett My question was about what to do before importing to .com, of course. –  Ory Band Feb 19 '12 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? –  Chip Bennett Feb 19 '12 at 13:50

2 Answers 2

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.

share|improve this answer
up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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