This document provides optimization tips for scaling WordPress to handle high traffic volumes. It recommends using caching plugins like W3 Total Cache to optimize page speeds. It also suggests serving static assets through a CDN and moving to a VPS or dedicated server for higher traffic sites. For very high traffic sites of over 10 million daily hits, the document recommends load balancing across multiple HTTP and database servers, as well as implementing database sharding or replication using tools like HyperDB to partition data across databases.
2. Roshan Bhattarai
? Father
? Author - (Co-author : PHP Ajax Cookbook )
? Software Developer
? And so called CTO @ proshore
3. Optimization Tips for Shared hosting
? Use W3 Total Cache plugin for caching page and
datas .
? Serve all the static contents(JavaScript , CSS files
and Images ) from Content Delivery Network.
? Use jQuery lazy load plugin to server images if
there are many.
? Minify and Gzip the CSS and and JavaScript files.
? For big number of posts and comment table use
MySQL¡¯s logical partition.
http://pento.net/2011/04/28/partitioning-the-
wordpress-comments-table/
4. W3 Total Cache
Main Features :
? Page Caching
? Minify
? Database Caching
? Headers: W3TC manages the HTTP headers
(cache-control, expires)
? Content Delivery Network (CDN )
5. Content Delivery Network
? Serving static content directly from own server
? Uploading static files to server and serving
from there
6. Still problem
¡¡¡¡¡¡..
Time to move to VPS or Dedicated
Server ?
7. Recommended Server Configuration
? Use Nginx Web Server than Apache
? Use Varnish or Squid (Reverse Proxy Servers )for
serving static content over Nginx server
? Use PHP-FMP (FastCGI Process Manager)
? Implement Sphinx search engine or Lucene
Search Engine for full text search on database.
? As always use CDN ?
? Use Opcode Cache Engine for W3 Total Cache (
APC recommended)
8. That should be able to cope around 10
million hits a day on normal
Wordpress website.
http://www.ewanleith.com/blog/900/
10-million-hits-a-day-with-wordpress-
using-a-15-server
9. Still high CPU and memory ususage on
server ?
Time to use multiple HTTP servers and
multiple database servers.
11. Load Balancing Technique
? Round Robin DNS
? Software Load balancer ( recommended
HaProxy)
? Hardware load Balancing ( Cisco , Citrix etc )
Note : Use NFS to store static files and data on
database.