XML import from self-hosted site is missing all images

  • Unknown's avatar

    Hello!
    I am transferring a site from a self-hosted WP install to WP.com.
    I tried importing the full XML file, but received an error.
    So I imported posts, pages, and then media xml files.
    Posts and pages imported, but only two images out of 11000.
    When I view an imported post, the image URL is still set to the old site URL. The featured image shows a spinning wheel. Clicking to edit the image just takes me back to empty media library (since the image can’t be found).
    I tried splitting the (media only) XML file into smaller chunks, by month. Each time I get an email that the import worked, only to find no new media.
    Any ideas? Thanks!
    Old site: https://thebrentwoodspirit.com
    New site: https://brentwoodspirit.home.blog/

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there, is this still an issue for you? While I see images on your new site, it looks like those are being linked from your old site. I’ve gone ahead and flagged this thread for Staff attention and possible assistance.

  • Howdy –

    We will get this sorted. It’s something to work out on our side and I’ve reported your case to the team who works on this image importing issue.

    Once I have more news I will report back to you here.

  • Unknown's avatar
  • Hi! Checking in on this: would you be willing to create a full XML expert and upload it directly to https://wordpress.com/media ?

    We’ve got some folks working on this but we need to take a closer look. Thanks! Just update us here when that’s done.

  • Export, not expert :) Apologies for that and the double response.

  • Unknown's avatar
  • We have passed along the export internally and will keep you updated on any progress we make.

    Thank you!

  • The export files are still incorrect.

    There are 6,924 attachments in there, and no posts. My theory is the export is just too big for the self-hosted site’s server, and the process is dying before it can output the whole file.

    The WPCOM site has 986 posts and 22 pages. If you compare that count with the number of posts in the self-hosted site and it’s the same, then you’ll be OK just importing the media. I’d suggest trying to export it in chunks, choosing date ranges to create a number of smaller export files.

    Or, bundle all the media export files into a zip file and upload that to the importer. Or import them one by one. It’s a fairly big import, so it may take a while, but it should replace all the images in the posts with the imported ones.

    Open the XML file in a text editor like Notepad and check the end of the file. It needs to end with </channel></rss> like this, otherwise it’s not a valid file.

    I hope this helps!

  • Unknown's avatar

    Thanks for the suggestions!
    I had tried uploading media in chunks originally, but that didn’t work.
    The XML files appear to be complete, but also appear to have no media data in them.
    SO I updated WP from 4.9 to 5.1 and tried again… XML export and import appears to be working now!
    Will update again soon – Thanks all!

  • Unknown's avatar

    Thanks for coming back and letting us know.

  • The topic ‘XML import from self-hosted site is missing all images’ is closed to new replies.