SlideShare a Scribd company logo
Scaling WordPress for High
         Traffic
Roshan Bhattarai
•   Father
•   Author - (Co-author : PHP Ajax Cookbook )
•   Software Developer
•    And so called CTO @ proshore
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/
W3 Total Cache
Main Features :
• Page Caching
• Minify
• Database Caching
• Headers: W3TC manages the HTTP headers
  (cache-control, expires)
• Content Delivery Network (CDN )
Content Delivery Network

• Serving static content directly from own server
• Uploading static files to server and serving
  from there
Still problem
           ………………..

Time to move to VPS or Dedicated
           Server 
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)
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
Still high CPU and memory ususage on
                server 

Time to use multiple HTTP servers and
      multiple database servers.
Using Load balancer
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.
Database Replication
Database Sharding




Software used for sharding MySQL : HiveDB
For WordPress use HyperDB 
•   Ability to use multiple databases.
•   Supports partition of data.
•   Supports replication.
•   Supports failover.
Thank you for listening 

     Any questions?

More Related Content

PPTX
Drupal performance
PDF
Optimising for Performance
PDF
Web Performance Part 3 "Server-side tips"
PDF
Optimize drupal
PPT
Drupalcamp Estonia - High Performance Sites
PPTX
Nginx [engine x] and you (and WordPress)
KEY
WordPress: Performance, Optimization & Scaling
PPT
Drupal caching
Drupal performance
Optimising for Performance
Web Performance Part 3 "Server-side tips"
Optimize drupal
Drupalcamp Estonia - High Performance Sites
Nginx [engine x] and you (and WordPress)
WordPress: Performance, Optimization & Scaling
Drupal caching

What's hot (17)

PPTX
Microsoft Azure Media Services
PPTX
Storage Services
PPTX
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
ODP
Bcache and Aerospike
PPTX
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
PDF
Php & web server performace
ODP
Caching Strategies
PDF
Next Generation DevOps in Drupal: DrupalCamp London 2014
PDF
Building low latency java applications with ehcache
PPTX
Silverstripe at scale - design & architecture for silverstripe applications
PPTX
Drupal performance optimization Best Practices
PDF
Edge performance with in memory nosql
ODP
Drupal Performance and Scaling
ODP
Caching technology comparison
PDF
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
PPT
Implementing High Performance Drupal Sites
PDF
Memcache and Drupal - Vaibhav Jain
Microsoft Azure Media Services
Storage Services
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
Bcache and Aerospike
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
Php & web server performace
Caching Strategies
Next Generation DevOps in Drupal: DrupalCamp London 2014
Building low latency java applications with ehcache
Silverstripe at scale - design & architecture for silverstripe applications
Drupal performance optimization Best Practices
Edge performance with in memory nosql
Drupal Performance and Scaling
Caching technology comparison
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Implementing High Performance Drupal Sites
Memcache and Drupal - Vaibhav Jain
Ad

Viewers also liked (14)

PPTX
Enhance WordPress Search Using Sphinx
PDF
Project titles for B.E
PDF
Qualidade em Sac 2.0
PDF
Deepak strategic managemt -apple
PPT
Electricmotor2
PPT
Brief about nature care hospital pvt.ltd.
PPT
Presentatie rotary
PDF
Gmics vslides120811
PDF
What Makes Mobile Websites Tick - Oredev
PDF
E -commerce by DRG
PPTX
めとべや東京#7セッション資料(公開用)
RTF
Dsg steel1
PPTX
PolyU Design I MAKE Initiative (2015-10-31)
Enhance WordPress Search Using Sphinx
Project titles for B.E
Qualidade em Sac 2.0
Deepak strategic managemt -apple
Electricmotor2
Brief about nature care hospital pvt.ltd.
Presentatie rotary
Gmics vslides120811
What Makes Mobile Websites Tick - Oredev
E -commerce by DRG
めとべや東京#7セッション資料(公開用)
Dsg steel1
PolyU Design I MAKE Initiative (2015-10-31)
Ad

Similar to Scaling wordpress for high traffic (20)

PDF
WordCamp RVA 2011 - Performance & Tuning
PDF
WordCamp RVA
PDF
WordCamp RVA 2011 - Performance & Tuning.pdf
PDF
WordCamp RVA 2011 - Performance & Tuning.pdf
PDF
WordCamp RVA
PPTX
Anthony Somerset - Site Speed = Success!
PDF
23 Ways To Speed Up WordPress
PDF
WordPress at Peak Performance (Radio Edit)
PDF
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
PDF
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
PPT
Roy foubister (hosting high traffic sites on a tight budget)
PPTX
A crash course in scaling wordpress
PPTX
WordCamp Harare 2016 - Site Speed = Success
PPTX
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
PDF
Screaming Fast Wpmu
PDF
Speeding up your WordPress site - WordCamp Hamilton 2015
PDF
Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014
PDF
Wordpress optimization
PPT
Latinoware 2008
PDF
Optimizing wp
WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA
Anthony Somerset - Site Speed = Success!
23 Ways To Speed Up WordPress
WordPress at Peak Performance (Radio Edit)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Roy foubister (hosting high traffic sites on a tight budget)
A crash course in scaling wordpress
WordCamp Harare 2016 - Site Speed = Success
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Screaming Fast Wpmu
Speeding up your WordPress site - WordCamp Hamilton 2015
Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014
Wordpress optimization
Latinoware 2008
Optimizing wp

Scaling wordpress for high traffic

  • 1. Scaling WordPress for High Traffic
  • 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.
  • 13. Database Sharding Software used for sharding MySQL : HiveDB
  • 14. For WordPress use HyperDB  • Ability to use multiple databases. • Supports partition of data. • Supports replication. • Supports failover.
  • 15. Thank you for listening  Any questions?