Posts Tagged ‘wordpress import export 301’

WordPress Import

Thursday, July 16th, 2009

The import/export function in WordPress seems to have some issues. The one I ran into was exporting from a blog hosted on wordpress.com to a blog hosted on a lunarpages site. For the most part it worked fine, except for the images. I got this error on all of the post attachments:

Remote file error: Remote file returned error response 301 Moved Permanently

At first I thought it was a problem downloading from the wordpress site, and the few hits I got from Google seemed to confirm. But it turns out it’s a problem in the WordPress code for importing. Thanks to the last post on this page I was able to solve it. Well, sort of. The fix to functions.php (btw the function to modify is wp_get_http) solved the 301 errors and the import successfully uploaded the images to my server. However, all of the images remained linked to the old server.

Blarg.

Having run the import several times over, I deleted everything and tried again. The images again transferred successfully, but in the posts they remained linked to the old site.

My last resort was to go into the control panel for my site and use the SQL tools to do a replace on strings in the WordPress database. What a hassle.