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:
- Converting MySQL Database Contents to UTF-8 [en] (2004)
- The Four Lost Months Are Back! [en] (2009)
- Fixing Newline Abuse in WordPress [en] (2004)
- Quick Update on Blogging Disaster [en] (2009)
- Progress in Restoring CTTS [en] (2009)
- Scripts for a WordPress Weblog Farm [en] (2004)
- Apple Photos to Lightroom Classic CC: Step 2 [en] (2018)
- Requirements for a WordPress Installer Script [en] (2004)
- Invalid argument supplied for foreach() in wp-capabilities.php: Case Cracked! [en] (2007)
- Leaving Orange Again [en] (2000)
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.
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.
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.
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 ?
So:
hehe.
It seems that even simple photo upload hangs. Weird, because I think it used to work!
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…
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!
oooppss, le code a ete supprime! Tu dois juste faire appel a “phpinfo()” en fait: http://ch.php.net/phpinfo
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
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!