Managing WordPress Blogs

MPDL,BlogSupport

This page shows which administrative actions have been taken to run multi-blog WordPress instances as a single dedicated service (named "wp" here) on an arbitrary host.

Defining and designing an appropriate service complex on system administration levels (assuming SuSE's SLES 11.3 here) is crucial for its handling later on when it comes to updates or migration.

Note, that this recipe is a very general one. It may be applied to similar LAMP-style services very easily.

Pre-Requisites

 * Linux
 * Apache (and some modules)
 * MySQL
 * PHP

Service Attributes

 * service IP address and DNS entry (wp.mpdl.mpg.de)
 * apache2 vhost definitions
 * other system definitions (eg. logrotate, cron for backups)
 * MySQL database instance

Blog Attributes

 * DNS entry (IP may be dedicated or cnamed to wp)
 * id (like wp )
 * root directory (for installation and exceptions)

Common Directory Layout

 * network definitions /etc/sysconfig/network/ifcfg-eth0
 * apache vhost definition /etc/apache2/vhosts.d/wp.conf
 * MySQL configuration /etc/my.cnf
 * MySQL instance data directory /src/mysql/wp
 * logrotate definitions /etc/logrotate.d/wp
 * cron entry /etc/cron.d/wp
 * backup script /usr/local/sbin/svc-backup (to be called with argument: wp)
 * base WordPress directory /srv/web/wp
 * WordPress stuff backup directory /srv/backup/wp

Blog Specific Data

 * root directory /srv/web/wp/
 * local apache configuration .htaccess
 * database 
 * database user _user and password

Blog Customization

 * admin user _chief and its secret password

WP-Server
/srv/web/wp/inst/wp{ID} {FTP-SERVER}(no_subtree_check,rw,no_root_squash,async)
 * export username wp blog's instance directory to ftp server

FTP-Server
UnixAuthentication           yes
 * Activate in /etc/pure-ftpd/pure-ftpd.conf

useradd -c "user" -m -u {UserID} username mkdir /home/username/wp{ID}
 * Add new user

{VM}:/srv/web/wp/inst/wp{ID} /home/username/wp{ID} nfs rw,addr={IP} 0 0
 * Add fstab

mount {VM}:/srv/web/wp/inst/wp{ID}
 * Mount exported WP instance

How to add another blog

 * global network configuration (add CNAME or A-Record for a blog IP address)
 * local network configuration (add IP, if A-Record)
 * apache configuration (add blog specific line to vhost configuration file)
 * MySQL configuration (add database, user/password and her privileges)
 * WordPress customization