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 want to move someone else's WordPress blog to a new server. I only have access to the exported XML file of the blog. When importing the XML with the Wordpress Importer plugin, everything went fine except for importing the images.

It seems the authors of the blog did not use the built-in upload functionality to add images to a blog post, but uploaded them separately on the server.

I was able to download all the images referenced in the blog posts and store them in the "uploads" folder, so all images display correctly on the new server.

However they don't appear in the media library and thus I can't access them in the code of the new theme.

So my question is:

How do I scan all blog posts for image references and add them as attachments?

share|improve this question

1 Answer 1

I'm in the process of developing a media tools plugin. One of the tools is an import as attachment that goes through the content of all your posts, pages or custom post types and imports and attaches the images to the media library. It also changes the url referenced in the content to the new url created by the import.

https://github.com/c3mdigital/media-tools-for-WordPress

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.