I have recently been researching how to setup an optimized WordPress MU install as well as how to scale the server for thousands of users. Its so hard to tell when you will need to scale, so my suggestion is to figure out how much your system can handle before it cracks. Here is what we did to setup a self-monitoring optimized dedicated redundant server, which is not scalable (will get to that later) yet but at least a solid base:
Linux Server Base Config
- Install Debian Etch 64-Bit
- Install self-signed or bought certificate fr SSH, IMAPS, HTTPS
- Protect against brute force SSH access with software package – “sshguard”
- Firewall needs to be checked and ports opened where needed
- DNS setup – Choose a domain and setup
- IP Number allocation
- Mail – SMTP
- Internal Access – SSH, Monitoring Web Services
- Web Traffic – HTTP
- Postfix installation and configuration – DNS MX record needed
- Mailbox Server – Dovecote IMAP server (POP is prone to more attacks)
- Apache 2.0 web server setup and config + install of extra modules
- Web caching – Varnishd
- Mysql 5 database server setup and optimized according to Matt Mullenweg directions.
- MySQL Caching installation + testing – Memcached
Testing, Monitoring and Optimization
- Vulnerability testing – Nessus
- Monitoring sotware installation and configuration
- Cacti graphing + Nagios monitoring + alert
- Nagios alerts sending email/sms warnings
- Track: cpu lad, disk space, web traffic, apache status (Web hit frequency, bandwidth)
- Apache stress testing
- ab – Apache HTTP server benchmarking tool
- Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance
- Determine number of simultaneous users and max sustainable b/w
- Hit box with tests until it reaches “freeze” state
WPMU Install
- WordPress MU
- BuddyPress is optional…
- bbPress
- MU-Plugins (WPMUDEV)
- Plugins
- Themes
Backups
- Backups to be configured to dump to another server and scheduled (Every 2 hours and rotated n a weekly basis), backups via Crontab to back up the following files:
- Backup system config files, e.g. /etc/*
- User configs and home directories
- Apache hme (/var/www)
- Mysql dumps
- Create ISO from complete installed system as above
- Test restoration of system
Ongoing Maintenance
- Log in and peruse root mail & logs, take action if necessary
- Compile a mini monthly report on stats usage
- How will we log support
- What does response time need to be
- Vunerabilities
Other considerations
- Server migration/replacement at least every 3 years recommended (Reinstall from Recovery ISO, update all packages, recreate ISO)
- Scalability plan
- Move mysql off to dedicated server and/or split the DB
- ultiple front ends (Apache)
- Loadsharing front end (Pound)
I have just finished up this install on a dedicated server in South Africa at Hetzner datacenter. We are going to go live with system on the system once WPMU 2.7 and BuddyPress 1.0 become stable. For now I am experimenting with various optimization tricks to see if we can make WP sing like a bird?!
Feedback is welcome! My next post will be about scalability.

Just off to bed, but I’ll have a good read through your posts and comment tomorrow.
Thanks for the details on your ded server setup. People have also recommended some sort of PHP op-code cache like APC or eAccelerator (which I have enabled for our site). There are a few more PHP gotchas, especially when setting up a VPS or server from scratch. Like GD library, mcrypt, etc…
Thanks for the input, my next post is going to discuss further optimization with a focus on scalability. Will go over a few of the things we have been testing. eAccelerator was one of the topics we are still deciding on… More details to come!
Andy and I were talking today about DB scaling and the possibility of using HyperDB or another solution. I actually started running the Multi-DB plugin from incsub with buddypress today and it works fine. It would require some tweaking to distribute user data across multiple databases, but works fine as is right now.
HyperDB is also a nice solution for keeping your database split across multiple datacenters and/or replication for redundancy as well. I also have used it and it works great for this purpose.
I have been using xcache myself on most of my installs, but have thought about going back to eAccelerator to test some differences.
Another couple things to look at are “brute force” in conjunction with APF (advanced protection firewall) as they are a nice combination.
This is amazing! I am getting such valuable feedback from the community.
@Trent – Thank you for your time and input. I will consider your comments and include them in my next post.
hi,
I just bought a VPS and installed webserver, mailserver and also WP MU + BuddyPress successfully.
Gmail doing just fine, but I have problem with Yahoo! flagging emails sent from my server as spam.
Have you ever had such problem?
FYI, my domain is: oke.la
Thanks
@Azwar Rosyadi – I don’t use Yahoo for anything except Flickr, so can’t help too much there, sorry buddy.
nginx, gigs and gigs of memcached, with the module and just one mysql on a four core box.
“My next post is going to discuss further optimization with a focus on scalability.” — FeedMyMedia
At 200+ queries per page, BuddyPress is so bloated that anybody with any amount of traffic will need a cluster to run it, regardless of Nginx, Memcached, eAccelerator, etc. Even Wordpress.com with all their hardware resources will have a serious problem adding this BuddyPress “plugin”. It’s a good idea implemented as bloatware.