« The Migration | Main | GEDCOM Test »
Restoring WordPress on the ReadyNAS Pro
By dbott | February 5, 2009
The process of re-initializing my ReadyNAS Pro has forced me to wipe out this blog and re-create it.
Now, the fine folks over at the ReadyNAS.com forums have provided a fairly straight-forward how-to on setting up WordPress on the ReadyNAS, but it doesn’t really cover restoring a WordPress blog, so I’m going to document my steps in case I have to do this again.
Rather than install PHP and MySQL from the Debian repositories (steps 3 and 4 from the how-to above), I’ve elected to use a few of the many add-ons created by super-poussin:
After creating the webserver share and installing the SSH Add-on, I used the PHP & MySQL and MySQL On Add-ons in lieu of steps 3 and 4, and then installed WordPress manually using the how-to above. After installing the add-ons, you will need to reboot the NAS.
After that, I created the MySQL database for WordPress:
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost"
-> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> EXIT
Bye
At this point, WordPress is installed and ready to be configured.* My problem is that I had already created a WordPress blog and needed to restore it. Before beginning this process, I copied all of the existing content over to my backup drive and then I dumped the WordPress MySQL database. After setting up the empty WordPress blog, I copied back all of my data files from backup to the share on the NAS and restored my wordpress_1.sql database:
NAS-PRO:~# mysql -u root wordpress < wordpress_1.sql
At this point, all of my data and settings have been restored and the WordPress blog is up & running.
*For some reason, whenever I tried to load a .php file in my browser the file would try to download rather than display. As it turns out, I needed to edit the /etc/frontview/apache/httpd.conf file to include the line in red to prevent the .php files from downloading:
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
LoadModule apreq_module /usr/lib/apache2/modules/mod_apreq2.so
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
And finally, I restarted the webserver (or reboot):
NAS-PRO:~# apache-ssl -f /etc/frontview/apache/httpd.conf
Topics: ReadyNAS, Tech | 1 Comment »
September 17th, 2009 at 9:16 am
To add additional mysql functionality, like mysqldump, you will need to install the following package:
apt-get install mysql-client-5.0