WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From one domain (foo.com), select export as WXR and import to (bar.com), also I manually uploaded wp-contents to the new location.

Everything is working, except the the images in the blog post still using the old domain.

  1. How to solve it?
  2. I have tried to upload into wp.com and they can auto update the images' location, but this does not work for self-hosted wordpress?


share|improve this question
up vote 1 down vote accepted

When you import the WXR file to the WordPress install on the new domain, be sure to click the "Download attachments" checkbox that you are presented during the upload process.

share|improve this answer

Try this plugin - http://wordpress.org/extend/plugins/search-and-replace/

Search for your old domain and replace with new... should search through all entries in your database and replace.

share|improve this answer

If it is an option (the old domain still has to be functional and you can't do it from localhost to hosted) Chip Bennet's solution is probably the best, otherwise, I like Velvet Blues Update Urls.

share|improve this answer

Also check this out: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ It's not a plugin, just a script you load directly. Great tool and personally I migrate all my WP sites with it.

share|improve this answer

Your Answer


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.