WordPress.org

Forums

Images in Media Library not attached after importing to another wp setup (15 posts)

  1. milosp
    Member
    Posted 4 years ago #

    I exported everything from the wp dashboard, and imported in my localhost WP setup. Even though single posts are displayed correctly, all images in Media Library are unattached. This results in that I can not extract thumbnails for homepage since no image is attached to any post. How do I reattach it and have functional mirror of my page locally?

  2. RichardWPG
    Member
    Posted 4 years ago #

    which version of WP are you using?

  3. milosp
    Member
    Posted 4 years ago #

    Latest, 3.3.1, both wp setups are up-to-date

  4. milosp
    Member
    Posted 4 years ago #

    All localhost pages drag images from online version
    -i tried replacing all "mypage.com" to "localhost/wordpress" and reimporting the sql file but nothing changes
    -"scan for lost attachments" button does not do anything

    Any other ideas?

  5. ghulst
    Member
    Posted 4 years ago #

    I have the same problem. Imported the posts, checked the "import media" box, but all it does is link to the old site for all the images.

  6. douglerner
    Member
    Posted 3 years ago #

    I have, I guess the same problem. I exported from wordpress.com and imported to my self-hosted site.

    (1) All the images display, but the media are all links to wordpress.com.

    (2) All the media appear to be there, but they are all "unattached."

    Is there a solution for this?

    Thanks,

    doug

  7. milosp
    Member
    Posted 3 years ago #

    You can open database file in notepad and use search&replace function
    to change "wordpress.com" to "yourdomain.com"
    This works if you don't have functions that extract thumbnails from the posts.
    I have looked through all migration, mirroring, backup tools, and unless there is something new in the last 3 months, you are out of luck. None of these plugins do the job right.

  8. douglerner
    Member
    Posted 3 years ago #

    I don't know what it is, but out of 800 some-odd media files, 696 are unattached.

    Looking at the posts for those, I don't see any way of doing a search-and-replace. It's not just the domain names which are different. :(

    I have another longer thread on this that explains more in detail at http://wordpress.org/support/topic/export-from-wordpresscom-then-import-to-self-hosted-leaves-media-there?replies=7.

    I think my only choice is to maintain my wordpress.com site as a "media repository." I hope wordpress.com isn't going anywhere...

    Sigh.

    doug

  9. milosp
    Member
    Posted 3 years ago #

    In control panel you have exported an XML file to import in your self hosted website... Open that file in notepad or wordpad and press ctrl+h and just substitute domains. The media will still not be attached, but the files will be drawn from you domain.

  10. douglerner
    Member
    Posted 3 years ago #

    The problem is that the format of the URLs is too different. I don't think it's just a matter of global replacing the domains.

    For example...

    Here is a post at my self-hosted site:

    http://douglerner.net/devil-mon-chan/

    The image there is linked to:

    http://douglerner.files.wordpress.com/2010/02/media_httplernernetbl_bnugv-scaled5001.jpg?w=300

    The unattached media file which got imported has a URL of:

    http://douglerner.net/wp-content/uploads/2012/03/media_httplernernetbl_bnugv-scaled5001.jpg

    So even if I change all instances of douglerner.files.wordpress.com to douglerner.net it wouldn't help. Unless I'm missing something.

    doug

  11. douglerner
    Member
    Posted 3 years ago #

    Here's maybe a better example.

    Here is a post with a picture in it:

    http://douglerner.net/edo-no-koku-edo-era-time-keeping/

    The link for that picture goes to:

    http://douglerner.files.wordpress.com/2007/07/edo-scaled10001.jpg

    In the Media library there are TWO edo-scaled10001.jpg pictures for some reason. I don't know why:

    1. http://douglerner.net/wp-content/uploads/2012/03/edo-scaled100011.jpg

    2. http://douglerner.net/wp-content/uploads/2012/03/edo-scaled1000.jpg

    The first one says "attached" but it's not the image that appears in the post. I don't know why not.

    The second one says "unattached."

    Confusing! The whole thing is confusing.

    Originally many of these were imported to WordPress.com from Posterous back in March. I think those are the ones experiencing this problem.

    doug

  12. douglerner
    Member
    Posted 3 years ago #

    I also wonder if part of the problem is that I needed to run the importer like 4 or 5 times, each import times out and the next import skips over "existing" media and then imports the next ones.

    Could this be creating duplicates?

    If so, how can I avoid the problem?

    Still, the media count at wordpress.com and my self-hosted blog are the same.

    doug

  13. douglerner
    Member
    Posted 3 years ago #

    Agh. The whole thing's held together with rubber bands. I'm seeing some photos which link to Posterous also (which I imported from to wordpress.com).

    Since these are all older posts, I think what I'm going to have to do is just live with it and slowly, over half a year or so, go through each post and change the links, adding new media as needed.

    Or maybe somebody will come up with a reliable Posterous importer (where these all came from) and I can re-import the whole blog directly from Posterous without going via wordpress.com.

    doug

  14. milosp
    Member
    Posted 3 years ago #

    When an import fails, I download reset plugin and reset the whole wp installation which deletes everything, then I reimport it again. Be aware it erases also files, posts, setting, themes...

    WP is a great platform, but some really BASIC features are missing.

  15. douglerner
    Member
    Posted 3 years ago #

    The problem is the import always stops mid-way through. I just keep on starting it over and over again until it finally finishes.

    If I reset the site each time the import doesn't finish I will never finish. Literally. It seems to grab some stuff, then time out. Then the next time through it skips over the stuff it got before and gets some more stuff and then times out.

    Doing that 4 or 5 times it will eventually finish and you'll get your "have fun" message.

    But each time I try this I get most or all of the media files "unattached."

    I just tried with a completely new wordpress instance in another domain and 100% of the images were unattached and all the links in the posts went back to wordpress.com.

    I think it's just the state of the technology.

    doug

Topic Closed

This topic has been closed to new replies.

About this Topic