I had to import all of my posts from my old blog to a new one. Was dreading the thought of having to import all of the images manually after noticing using WordPress Importer only made the attachment point to the old URL.
Found this plugin and followed the instructions in PhiLHo's comment above and it worked perfectly.
We asked ourselves lot of questions about how to use it, but it is actually very simple. But it is better to be explicit about the procedure, though...
We installed the plugin on the WordPress site to export.
We exported the articles via WordPress (Tools > Export > WordPress).
Then we exported the media via the plugin (Tools > Attachment Export or Export item in the plugin list). We need to rename the exported XML file as it will have the same name than the previous one. You must keep both.
Then, in the target site, just import (Tools > Import > WordPress) the file with the articles, then, with the same command, the file with the media.
After the first import, you can see the articles with the images, but they point to the old site (ie.
http://your.old.site/wp-content/uploads/some/date/name.jpg for example).
After the second import, they will point to the new site, to the imported files.
- Images are fetched from the old site, so it must be online. See the forum (Support) for alternatives (FTP).
- PHP / WordPress doesn't like long operations, so the import might "fail", because it takes time to import all these files. But it has actually done part of the work. Import the media XML file again, it will skip over the already imported files (with a message) and continue where it stopped.
Seriously I borked a script and lost all media in the new site. This worked great to get all images back into the media library.
works as described!
Perfect, saved me a lot of trouble
Works described, but I did hit the timeout issue. Rather than fiddling with PHP/Server settings I just split the XML file up. More specifically I saw where the import had left off and I just deleted those items and retried the import.
Perhaps you can add a "batch" parameter where the user could split the imports into batches of 25, 50, 75, 100 files. From my experiences with a vanilla install I think 50 would be a sensible default. Then again this may be dependent upon a myriad of factors...
How I do it:
1. Install & activate 'WP Attachment Export' plugin in old WP site.
2. In old WP site, run export, and download the .xml.
3. Copy entire 'uploads' folder from old WP installation to the new one.
4. From new WP Dashboard, run Tools-> Import -> WordPress, and upload the .xml file.
Note: I ran them in localhost.
Very helpful and right on time.
I needed to export all the meta data, alt tags etc...worked like a charm.
You must log in to submit a review. You can also log in or register using the form near the top of this page.