alistairphillips.com

I’m : a web and mobile developer based in the Australia.


WordPress

WordPress is a blogging application that started out as b2/cafelog and has since grown into probably one of the most common blog systems out there. While WordPress only supports one blog per installation you can "hack" it if you don't want to go down the route of the (more complicated and less supported) WordPress MU.

My current WordPress setup at site5 is as follows:

<?php
 // Change SECRET_KEY to a unique phrase.  You won't have to remember it later,
 // so make it long and complicated.  You can visit http://api.wordpress.org/secret-key/1.0/
 // to get a secret key generated for you, or just make something up.
 define('SECRET_KEY', 'xyz');

 // You can have multiple installations in one database if you give each a unique prefix
 switch ( $_SERVER['HTTP_HOST'] ) {
     case 'techgiftguide.com':
     case 'www.techgiftguide.com':
         $table_prefix = 'wp_techgiftguide_';
         break;

     case '0gravity.co.uk':
     case 'www.0gravity.co.uk':
         $table_prefix = 'wp_0gravity_';
         break;

     default:
         $table_prefix = 'wp_';
 }

 // ** MySQL settings ** //
 define('DB_NAME', 'mysql_database_name');    // The name of the database
 define('DB_USER', 'mysql_username');     // Your MySQL username
 define('DB_PASSWORD', 'mysql_password'); // ...and password
 define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value
 define('DB_CHARSET', 'utf8');
 define('DB_COLLATE', '');

 // Change this to localize WordPress.  A corresponding MO file for the
 // chosen language must be installed to wp-content/languages.
 // For example, install de.mo to wp-content/languages and set WPLANG to 'de'
 // to enable German language support.
 define ('WPLANG', '');

 /* That's all, stop editing! Happy blogging. */

 define('ABSPATH', dirname(__FILE__).'/');
 require_once(ABSPATH.'wp-settings.php');
?>

Then in wp-content/themes I have a folder per site such as 0gravity or techgiftguide which holds the theme for that site. Simple and neat. And the greatest thing is that there is only ever one copy of WordPress to update, and database to backup.

Plugins

Ages ago I wanted some syntax highlighting for my blog (which was at alistairphillips.com ) and I decided to write FriendlyCode. Granted this was back in early 2005 but I think it still works and if you'd like version 0.1 can be downloaded here.

WordPress 3.0