I have used the WordPress Importer plugin to export content from site 1 and import into site 2.

When exporting content, i selected “All content” and downloaded the export XML file.

Then when i imported the XML file into site 2, i selected “Download & Import File attachments”. Though i got a bunch of errors at the end of the process saying that “Failed to import media”, i see that all posts and pages have got the corresponding images in them.

But what i saw is that, the image is referring to the first site.
I am not sure whether this is the default behavior of WordPress Importer.

Is there a good plugin that can fetch all images from site 1 to site 2, while importing content?

Otherwise, what i am planning to do is to copy all media images (wp-content/uploads folder) from site 1 to site 2, and then before importing XML file of site 1 into site 2, change the media links of XML file, to point to site 2.
It is suggested in a forum page.

But i see that this approach is an odd one. Can someone suggest me a better way to tackle this?

1 Answer
1

If the url changed for your new site you’ll have to do a search and replace of the old urls in your database. Always make a backup first.

See this Codex reference to do this safely:
http://codex.wordpress.org/Moving_WordPress#When_Your_Domain_Name_or_URLs_Change

Leave a Reply

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