WordPress.org

Ready to get started?Download WordPress

Forums

Re-Attach Images After Import (9 posts)

  1. artychan
    Member
    Posted 1 year ago #

    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?

  2. David Choi
    Member
    Posted 1 year ago #

  3. Pete
    Member
    Posted 1 year ago #

  4. artychan
    Member
    Posted 1 year ago #

    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

  5. sonnet01
    Member
    Posted 1 year ago #

    I am fetching same problem . Please help me someone

  6. nr56
    Member
    Posted 11 months ago #

    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...

  7. David Choi
    Member
    Posted 11 months ago #

    @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

    http://wordpress.org/extend/plugins/unattach-and-re-attach-attachments/

    to reattach it again.

  8. nr56
    Member
    Posted 11 months ago #

    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)...

  9. David Choi
    Member
    Posted 11 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic