Support » Fixing WordPress » Re-Attach Images After Import

  • I recently moved my blog from one wordpress install to another. After using the WordPress Export/Import, while most of the images I have are showing in the media library that they are attached to a post or page, some are not.

    Anyone find a plugin or any way to automatically find which post/page an image should be attached and reattach all the unattached images?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Pete


    Thanks for the replies, but:

    wpthemes777: that’s only to clone sites. I’m trying to do this post-migration. Something I’d actually like to do at any time.

    Pete: Unfortunately, that only talks about detaching and manually reattaching

    Basically I’d like a plugin/script that::
    1. Pick an unattach file
    2. Find a post/page that file appears
    3. Attach file to said post/page
    but done automatically for each unattached file

    I am fetching same problem . Please help me someone

    Same problem here. Have searched high and low for a solution. The only thing possibly causing the problem that I have dug up is that it may have to do with the postmeta tables. Does that kickstart any ideas?

    All my images are in the posts (because the URLs are correct) but they are not “attached” to the media library…

    @nr56 Don’t know if that has to do with the migration process, because personally never had that problem. I think you have to use a plugin like

    to reattach it again.

    Thanks SPG. Unfortunately that plugin uses a very manual process and with the number of posts I have it would be impossible to go through one by one.

    While I agree this shouldn’t have happened during the migration I’ve seen enough questions about it that it seems to be a legitimate problem (images remaining in posts but not getting attached to post and showing in media library for that post after migration using export/import)…

    Ah, sorry that I’ve overlooked the “export/import” part. What I always do for migration is using one of the methods:

    1. phpMyAdmin to export and import

    2. mysqldump from SSH command line

    3. Use MySQL client software like SQLyog to copy the database to another server.

    I never use “export/import” due to the problems you’ve mentioned caused by MySQL auto table primary key ID incrementation being inconsistent between the servers for obvious reasons.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Re-Attach Images After Import’ is closed to new replies.