• So I’m trying to bring my posts from my live blog over into my dev blog, which I’ve done countless times before, to test out a new design. Anyway, for whatever reason, when I try to import the WordPress XML file into the dev blog, it uploads without issue, asks me to assign to a user, then it churns for a short while, then spits out a 500 internal server error. YET, some of the posts, the tags, etc. HAVE been imported. If I reload the error page, I’m asked if I want to submit the form again; if I do that, some more posts/comments/pages are processed. I’ve managed to bring in about 36 of my posts, but I have over 200, so that’s only a small part of my actual blog.

    If I check the server error logs, all I see is this:

    [Mon Nov 16 11:37:13 2009] [error] [client 66.92.65.152] Premature end of script headers: edit-pages.php, referer: http://dev.jeffbyrnes.net/wordpress/wp-admin/edit-pages.php
    [Mon Nov 16 11:37:13 2009] [error] [client 66.92.65.152] File does not exist: /home/jeffbyrnes/jeffbyrnes.net-dev/internal_error.html, referer: http://dev.jeffbyrnes.net/wordpress/wp-admin/edit-pages.php
    [Mon Nov 16 11:51:43 2009] [error] [client 66.92.65.152] File does not exist: /home/jeffbyrnes/jeffbyrnes.net-dev/internal_error.html, referer: http://dev.jeffbyrnes.net/wordpress/wp-admin/admin.php?import=wordpress&step=1&_wpnonce=649ae81341

    Which really doesn’t say much at all. And I’ve already double-checked PHP’s memory allocation, it’s set to 90 MB, and that should be PLENTY. I’ve also gone ahead & restarted the server, to no avail.

    I’m worried there’s something very wrong with my live blog and what it’s outputting to the XML file, but I really have no way to verify that.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have the same problem :/ Any one has some idea to solve this issue?

    I had the same problem running WP 2.9 while trying to import a 1.8 MB XML file. I finally got everything imported by:

    1. Breaking the XML file into several 400 KB chunks
    2. After having all tags and categories imported, I removed them from subsequent XML files to import

    Basically, try cutting your file sizes down a lot. If you want to go extreme, try importing a one-post XML file to see if that works.

    -ALJ

    I experienced this same problem also running wordpress 2.9.1 on Dreamhost. After I was able to override the upload_max_filesize and post_max_size to allow me to upload larger files, I ran into this problem while importing my 8.1mb WP .xml file.

    What I did to get everything imported:
    When I got the 500 Internal Server Error, I kept on refreshing the page until I saw that all of my data had been imported, and was eventually taken to the confirmation page. Every time I clicked my browser’s refresh button to reload the 500 Error page, the dialog box comes up and wanted to resubmit the information. I just accepting the dialog box and kept refreshing the page until a WordPress page came up that listed a lot everything it tried to import, some saying that posts already existed, and said “All done. Have fun.” at the very bottom.

    They way I monitored this to make sure things were updating was to have 2 tabs in my browser open. One browser tab was used for the import and to get the 500 Error and the other browser tab was used to view the main blog dashboard that has a count of posts, comments, tags, etc. Every time I would refresh the 500 Error tab, I would let the refresh run for a minute, then switched to the second browser tab and reload that page, which would update the counts of the posts, comments, tags, etc.

    I noticed that all of my posts, tags, comments, and categories were eventually added. I also resulted in 6 duplicate categories that had 0 posts in them. After deleting these empty duplicate categories, all of my numbers matched up to the blog I exported from. This might have taken me a half-hour to do.

    What I think is going on here is that every time you refresh the page, it skips things that were already imported and imports more. The page re-load skips the stuff that was loaded in before and proceeds to the next stuff.

    I think this might be a problem with the server memory limit, which I think there is a 8M limit which cannot be overridden on Dreamhost. “Maximum amount of memory a script may consume (8MB)” even though the value defaults at 90M (someone please correct me if I am wrong).

    I have not tried to break the .xml into pieces yet but I might try it out because it was a little difficult to implement a custom php.ini.

    I tried my solution again and never go the ‘done importing’ confirmation page but just kept refreshing the error page until I saw that all of my data was imported

    Check error logs for errors thrown by plugins.

    Was having a nitemare importing… would only do 1 or at a time of over 1000 items. Noticed in the error logs a plugin was throwing an error on every page load.. import load.

    [Fri Mar 26 00:24:44 2010] [error] [client 68.3.**.***] PHP Warning: require_once() [function.require-once]: Filename cannot be empty in /*****/httpdocs/wp-content/plugins/wp-to-twitter/wp-to-twitter.php on line 287, referer: http://****/wp-admin/admin.php?import=wordpress&step=1&_wpnonce=4e75534c93

    i disabled all plugins.. imported all 1000+ items no problem.. just took a while.

    I’ve tried all of the above and still the 500 errors persist. Thanks in advance for any direction.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Importing WordPress XML fails with a 500 error’ is closed to new replies.