How do I import with files?

  • Unknown's avatar

    Hi,

    I was trying to migrated an old WordPress blog (blog.baf.com.hk) to WordPress.com. That was a version 1.5 WordPress which I had to upgrade to the latest version before I can export all the blog posts as an XML file for import.

    When imported to WordPress.com, I checked the option to import files as well. All blog posts and comments were imported successfully. however, the files were not imported/uploaded.

    Is there a way I can upload the files to WordPress.com manually? I tried the XML-RPC API calls, but not succeeded.

    Thanks!
    Blog url: http://bafhk.wordpress.com/

  • Unknown's avatar

    The files have to be available in their original position for this to work – otherwise WordPress.com won’t be able to get them during the import. It looks like your images are offline, see for example this image:

    From this post:

    http://bafhk.wordpress.com/2009/09/09/%e5%b7%a5%e5%bb%a0%e7%9a%84%e6%93%b4%e5%bc%b5%e5%90%88%e4%bd%9c/

    The import will work correctly and import all files once you get these files back online.

  • Unknown's avatar

    Hi ranh,

    Thanks for your reply.

    I moved the old blog to another web host at http://ec2-122-248-223-33.ap-southeast-1.compute.amazonaws.com/, then I use SQL to replace the links the images linked to with the new URL in the database. I was to import blog contents to another blog on WordPress.com (bafhktest.wordpress.com) I just created, but again, the images were not imported.

    I found this post they mentioned that WordPress can only import attachments in the exported XML file http://wordpress.org/support/topic/how-do-i-transfer-images-from-wordpresscom-to-a-custom-hosted-site, this is new to version 2.5. As I had upgraded from WordPress version 1.5 to version 3.1, I thought I would be able export the images to the XML. But unfortunately, all images from the old posts were not exported.

    What can I do now? I was still trying to use the XML-RPC API, but it doesn’t seem to work.

  • Unknown's avatar

    I think a new export from the newly installed http://ec2-122-248-223-33.ap-southeast-1.compute.amazonaws.com/ site should work to import images, but only if the images are attached properly inside that blog (i.e. not just by updating links in the SQL but the images must be attached properly in the media library itself) and if you selected the option to download media attachments in step 2 of the import process. Do you recall if you did that?

    We could try taking a closer look at your export file for you. Could you send the latest export file you tried to support@wordpress.com and reference this URL in your note? https://en.forums.wordpress.com/topic/import-with-files?replies=3

  • Unknown's avatar

    The images are not attached to the media library as WordPress 1.5 does not have a media library, no images were shown in the media library after I upgraded it to version 3.1. So the exported XML doesn’t have any media attachments as well.

    However, I managed to solve that by using the XMLRPC API to upload all images to WordPress.com, but I also had to replace all those image links in the blog posts using SQL before I imported to the new WordPress.com blog.

    That works fine, but the problem is I wanted to remove all blog posts from the new WordPress.com blog which I previously imported then import the new XML with image links replaced.
    WordPress.com doesn’t seem to allow me to do that, It has just showed me the processing message for the last few days.

  • Unknown's avatar

    We can empty out the blog for you and reset it to factory settings – just confirm that you still want to do this.

  • Unknown's avatar

    No, thanks. I have finished the import, everything is fine now.

  • The topic ‘How do I import with files?’ is closed to new replies.