Downloading Images for Import

  • I’ve tried using wordpress.com ‘s import function to import from “wordpress export” files. If you set up your own wordpress on your own server, while you are importing “wordpress export” files you are given the option to “Download Attachments”. This will make the import script download the images that are linked in the XML file and they are moved to the new server and the links are updated on the new blog. Now the problem is, there is no such option with wordpress.com. When you import the files that have attached images, it simply says “Skipping attachment …” for each of the images. Is there anyway around this problem? Am I doing something wrong? Does wordpress.com allow, at all, any time up attached image import?

  • I would also like to know if this is possible. I have just moved from hosting a wordpress.org blog on my own web space to a free wordpress.com blog for financial reasons and I really don’t relish the idea of uploading two years’ worth of images from scratch!

  • Yo you guys are doing import into wordpress.com. I have problem doing import from wordpress.com into my own domain. Downloading attachment/images gives a 301 redirection error.

    I figure out its due to the permalinks enabled on wordpress.com. Still trying to figure out a way to import my images successfully.

    Good luck guys!

  • 1. First make sure safe_mode is off
    2. Make sure there are no open_basedir restrictions
    3. I checked both 1 & 2, because supposedly curl doesn’t handle 301 if they are on, but neither solved my problem.
    4. So here’s what I did:

    In file wp-includes/functions.php modify function wp_get_http().
    Here is the diff:

    1052c1052
    < //ini_set(“display_errors”, true);

    >
    1061,1069c1061
    < $response = wp_remote_request($url, $options);
    < $headers = wp_remote_retrieve_headers($response);
    <
    < $cd = (string)$response[‘response’][‘code’];
    <
    < if ($cd == ‘301’) {
    < $response = wp_remote_request($headers[‘location’], $options);
    < $headers = wp_remote_retrieve_headers($response);
    < }

    > $response = wp_remote_request($url, $options);
    1074c1066
    < //$headers = wp_remote_retrieve_headers( $response );

    > $headers = wp_remote_retrieve_headers( $response );
    1077d1068
    <

    Jason Livesay
    (email visible only to moderators and staff)

  • The topic ‘Downloading Images for Import’ is closed to new replies.