7. Oktober 2009

Solution for WordPress import error

Category: Howto / Tutorial — Tags: – Kay Smarczewski @ 12:51

Today I moved my wordpress.com blog to my own server (WordPress version 2.8.4). Of course, I wanted to ex- and import all my old articles, comments, images etc. Fortunatly, there is a special tool for that. Unfortunatly, this tool seems to be a kind of unstable. So I got the error
Remote file error: Remote file is incorrect size
But I found a little workaround for this.

In my case, the $headers['content-length'] doesn’t included the expected value. It contained the size of the file in an array instead of the raw integer. So my tiny workaround is to insert one line (in this example line 620) of code into the wp-admin/import/wordpress.php-file right after the declaration and the first occurence of $headers respectively. In the current stable release 2.8.4 it should look like this:

618 // fetch the remote url and write it to the placeholder file
619 $headers = wp_get_http($url, $upload['file']);
620 $headers['content-length'] = $headers['content-length'][1]; // insert this line right here

Note: The error message seems to be caused by several issues. So this solutions does not need to fit for your problem. Other workarounds can be found on the WordPress forum.

2 Kommentare »

  1. danke für den tipp, hat sehr gut funktioniert :-)

    Kommentar von frau baron — 13. Januar 2010 @ 23:27

  2. Eigentlich ein hammer Beitrag, nur kannst du im nachsten Post nicht n bisschen detaillierter sein? Das ware echt super :-)

    Kommentar von Leno Mochof — 5. Februar 2011 @ 02:06

RSS Feed für Kommentare zu diesem Artikel. | TrackBack URI

Hinterlasse einen Kommentar

XHTML ( You can use these tags):
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

Kay Smarczewski


mein Blog

Seiten

Kalender mit Posts

Oktober 2009
M D M D F S S
« Sep   Dez »
 1234
567891011
12131415161718
19202122232425
262728293031  

Schlagwörter

Dieses Blog durchsuchen

© Kay Smarczewski – Powered by WordPress