Page 6 WordPress via svn and setting up W3 Total Cache
The server is ready to install WordPress
Create your database
mysql -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 databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "user_name"@"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
Install WordPress via SVN
cd /srv/www/yourdomain/public svn co http://core.svn.wordpress.org/tags/3.2.1 .
Add your database info to wp-config.php and install by visiting yourdomain.com/wp-admin/install.php
Use the Compatibility Check in W3 Total Cache to make sure everything is set up right. Yours will look similar to this one.
Set page cache and minify to disk enhanced. Object and database to APC. You can experiment with page cache via APC but with Nginx disk enhanced will most likely be faster.
If your doing this for the first time set up a test install to get the hang of if before you rely on this for a production set up or client site. Using Debian and the apt-get repos it’s pretty easy to manage your own dedicated server or VPS and you can lose the cPanel training wheels. Not only will your page load times drop you will have a good feeling of accomplishment.
To maintain your packages run apt-get update and apt-get upgrade every once in a while and you can follow @dotdeb on Twitter to stay up to date with upgrades.
Feel free to leave a comment or question. I would love to hear how this set up works for you.
Resources and further reading
- The Nginx forums
- The Nginx Wiki
- .htaccess to Nginx rule converter
- W3 Total Cache - WordPress Optimization
- Mark Jaquith on Quora - Why is Nginx so efficient?
- SCALING, SERVERS, AND DEPLOYS — OH MY!
- The Official Ubuntu Server Book 2nd Edition