Stuck [en]

All set to try importing old posts into a test database. Php.ini edited to allow big file size, long script execution times, etc.

But I get this:

Import WordPress

Sorry, there has been an error.

Failed to write file to disk.

I’m not the only one (google) but I’m stuck. Suggestions? I’m going to bed.

Similar Posts:

11 thoughts on “Stuck [en]

  1. Editing PHP.INI is dangerous unless you REALLY know what you’re doing. I would leave that plus .htaccess alone. Instead. try ‘chunking’ the database according to the instructions I set out in: http://www.accmanpro.com/2009/02/16/how-to-migrate-a-monster-wordpress-blog/

    It works flawlessly though you SHOULD check for any loss of stray images.

    It picks up all comments, tags and categories as well so you don’t need to restructure your ‘stuff.’

    Important to delete all spam that Akismet has caught to reduce your file size as far as possible.

  2. Thanks for the advice! This is not the first time I’ve fiddled in php.ini — wondering in what way you mean it’s dangerous? From what I’ve read in forums, the “can’t write file” error doesn’t really have much to do with the file size. It’s some other problem my tired mind is having trouble clearly identifying.

  3. Have you tried uploading a smaller file? That would definitely tell you if uploading works at all or not.

    An even more complicated alternative, which I tried to fit on a twitter reply and failed, would be to setup a local server (or ask someone with one), import the backup, dump the database, search and replace things that got messed up by the import (blog address, for example), import the sql dump to your host by phpmyadmin or ssh and hope for the best.

    It’s surprising that no one has made a plugin for importing wp backups using FTP’d files.

  4. You have “big dump” that allows you to make huge imports.

    But are you trying to restore a DB backup or to go through the WordPress process of posting, but batch ?

  5. So:

    • this is a wordpress export file (some sort of XML/Extended RSS) specifically designed for moving blog posts about
    • I do not have a DB backup
    • I would rather not import 8 years of posts manually 🙂

    hehe.

  6. Je sais d’oĂą ça peut venir. Tout simplement des droits sur le rĂ©pertoire d’upload.
    Le serveur (Apache) tourne sous un uid/gid (identifiant/groupe) qui n’ont pas les droits sur le rĂ©pertoire oĂą WP veut sauvegarder les donnĂ©es.
    Il faut déterminer :
    1- l’uid sous lequel tourne Apache (www-data sous Debian/Ubuntu, apache ou httpd sur d’autres distributions)
    2- le rĂ©pertoire d’upload

    Ensuite (en imaginant que c’est sous www-data que tourne Apache) :
    cd /le/repertoire/d/upload/
    chown apache .
    chmod g+w .

    Et voilĂ  ! Les “points” (.) sont importants dans les commandes ci-dessus, ça signifie “le rĂ©pertoire courant”.

    Je viens de faire un test sur un serveur maison et j’ai cette erreur :
    Import WordPress

    Sorry, there has been an error.

    Unable to create directory /var/www/wp/wordpress/wp-content/uploads/2009/02. Is its parent directory writable by the server?

    Donc si tu as la même erreur, il faudra chercher dans le sous-répertoire wp-content/uploads
    Mais peut-ĂŞtre que c’est un problème d’upload PHP, pas WP…

  7. Yeap, certainement un probleme de droit sur le repertoire “temporaire” d’upload.

    Pour le trouver, tu peux:
    1.- creer un fichier test.php n’importe ou avec comme code :

    2.- Acceder a ce fichier depuis un browser.
    3.- Recuperer la valeur de “upload_tmp_dir”

    Voila! 🙂

    IMPORTANT: n’oublie pas de supprimer le fichier test.php!

  8. Ce que tu peux essayer de faire, c’est d’abord de rĂ©importer ton fichier xml sur une installation locale, sans aucune restriction.

    Ensuite, une fois que ça marche, tu génères le big dump de la base, et tu recharges via phpmyadmin

  9. Entre deux, j’ai rĂ©ussi Ă  uploader un fichier d’import plus petit. Donc c’est pas un problème de droits, malheureusement. Mais merci pour la suggestion!

Leave a Reply

Your email address will not be published. Required fields are marked *