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

I am in the process of transferring posts from one WordPress install to another. I can use WordPress' Tools --> Export to export the XML I need for my posts. On the new install, I then use Tools --> Import to load the XML. I check "Download and import file attachments" and then finish the import. The pictures that are inline in my post work, but there are no images to be found in the posts' media gallery. The gallery tab under Upload / Insert is nonexistent, meaning there are no attachments associated with the new post.

I currently have the posts migrated, but attachments are still not. How can I do this? And also include the existing captions, descriptions, titles, etc.

Edit: I should add that this was a migration, so the site URL stayed the same -- It it just the server / WordPress install that changed. Therefore the image paths stayed the same, but they pictures just aren't registered in the posts' Media Gallery.

share|improve this question
Did you ever resolve this? – Damainman Oct 10 '13 at 16:05

In case if your images are lying in some other folder of your previous wordpress install, then did you try copying that entire folder in your current install?

share|improve this answer
Thanks for the reply! The images are in the correct directory (wp-content/uploads/YEAR/MONTH). I should add that this was a migration, so the URL actually remains the same, but the server changed. The images in the articles appear fine, as the path to the images stayed the same. But the images just aren't registered in the posts' Media Library / Gallery. – Ryan Nov 6 '12 at 5:57
Typically this data is available in the wp_posts table only (post_type='attachment'). Wherein, you should be able to find the exact path of the media that WP looks in (column guid). If the attachment rows have indeed been imported in the wp_posts table, then most likely it's the guid column values which are not correct. – kidakaka Nov 6 '12 at 6:03
Thank you! I will look into this today. – Ryan Nov 6 '12 at 15:30

Best way to move a site to a new server - either with out without a domain change - is to export the database. That way, the site will retain all meta data that is lost with a WXR export and import. Of course, you also have to move the uploads folder in wp-content/uploads/ and all subdirectories in it.

If you move the database, all media metadata is retained and all images will still be in the media library. See http://codex.wordpress.org/WordPress_Backups and Moving WordPress « WordPress Codex

share|improve this answer
Thanks for the reply! I actually had a third party migrating the site, but they botched the final sync and we lost all of our latest posts. So, there are only a handful of posts that I need to migrate, so I used WordPress' Export function as opposed to dumping the database and moving to the new host. – Ryan Nov 6 '12 at 15:29

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.