Downloading Images for Import

  • Author
  • #351382

    Original poster

    I’ve tried using ‘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 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 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 blog on my own web space to a free 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 I have problem doing import from into my own domain. Downloading attachment/images gives a 301 redirection error.

    I figure out its due to the permalinks enabled on 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:

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

    < $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);
    < //$headers = wp_remote_retrieve_headers( $response );

    > $headers = wp_remote_retrieve_headers( $response );

    Jason Livesay
    (email visible only to moderators and staff)

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