Today I decided to install a new OS onto my Raspberry Pi, since I want to try it out as a light web server for a local blog or website. After reading the raspberry.org site, I gave BerryBoot a try. I unzipped the required files onto my formatted SD card, and booted up the pi. I chose the OS BerryWebServer that gave me the option to install Lighttpd + PHP + SQLITE. Perfect, or so I thought!
When I installed everything, it booted and let me change my default password. It gave me the web address of the Pi, and I went ahead and FTP’d into my new pi web server from another machine. Since this install doesn’t come with an SQL manager, I installed PHPLiteAdmin. I ran into a few issues after uploading my wordpress files and edited my wp-config.php to match my server:
Although this installation is running SQLite, WordPress needs to be told this specifically since it uses MySQL by default. We need to install the PDO (SQLite) for Wordpress plugin.
To install PDO For WordPress we need to:
- unzip the files in your wp-content directory. The structure should look like:
wp-content
->plugins
->themes
->pdo
db.php
index.php[maybe]
Then in wp-config.php, right after the define(‘COLLATE’,”); line, we need to add
define(‘DB_TYPE’, ‘sqlite’); //use sqlite
After much trial and error, I still couldn’t get my database installed properly. I was puzzled by the fact that phpliteadmin couldn’t see the database WordPress would have created, as well as why I couldn’t log in once I WAS able to run the install. I found my answer here:
http://wordpress.org/support/topic/plugin-pdo-sqlite-for-wordpress-does-not-give-the-password-on-install-in-301
Turns out I had to add
function wp_install($blog_title, $user_name, $user_email, $public, $deprecated=”, $user_password = ”)
then
$message = __(‘Note that password:’ . $random_password . ‘ carefully! It is a random password that was generated just for you.’);
in the file ”wp-content/pdo/wp_install.php”. After that, I was able to see the randomly generated password on the page, and log in with that. (This will happen even if you do choose a password.)
I then found out after all this that the PDO plugin wouldn’t really work unless I went back to WordPress 3.1.2! Someone says that if you update WordPress after everything works, it will stay working as it should.
Either way, I’m happy I persisted, and now have my very light PiServer running at home