For the third or fourth time in the last two years (or so), my Raspberry Pi WordPress installation has crashed. Once I was able to fix relatively quickly, with little or no data loss. The others… not so much.
I even had a full backup on my latest installation… I thought. Trying to use that backup to restore (an admittedly wounded installation) completely crashed it. Not sure I want to try again… but certainly looking at alternative means going forward.
This time, the “fix” was to completely re-install MySQL, create a new WordPress database, and a completely fresh WordPress install. Need to make more notes of this to follow next time (and to store in something other than just the affected WordPress blog!).
And generally need to do a better job documenting my linux commands, probably both here, and elsewhere.
Re-install MySQL
sudo apt-get remove --purge mysql* sudo mv /var/lib/mysql /var/lib/mysql_backup sudo mv /etc/mysql /etc/mysql_backup sudo apt-get install mysql-server
Re-install WordPress
cd /srv/www/wordpress sudo mv public_html/ backup/ sudo wget https://wordpress.org/latest.tar.gz sudo tar -xvf latest.tar.gz sudo mv wordpress/ public_html/ cd public_html sudo nano wp-config-sample.php (configure database, username and password; save as wp-config.php) sudo chown -R www-data:www-data /srv/www/wordpress/public_html
Leave a Reply