SlideShare a Scribd company logo
1 of 25
Download to read offline
WordPress
Need for Speed
Or How I Learned to Stop
Worrying and Love the Traffic
Load.
Who Am I?
Background Story
Objectives
On Rendering Speed
On Processing Speed
Conclusion
Pascal Deschenes
Technologist, Nu Echo Co-Founder




@pdeschen
http://about.me/pdeschen
Background Story
When your
blog meld
down.
,,   To one who
     waits, a
     moment seems
     a year.
A 1-second
delay in page
load time
equals 11%
fewer page
views.


       source: Aberdeen Group
On Rendering Speed



                     Elapse Time for a Page
                     to Load Completely
Play the Page Speed Game
Tracking Speed with Google Analytics




    _gaq.push(['_trackPageLoadTime']);
A Web Page in
a Browser is
like a Jigsaw.
On Images

Optimize your image resolution

Do not rely on browser image scaling

Have a (small) favicon
On Scripts and Styles


Scripts to the Bottom

CSS to the Top

Combine & Minify

Limit Inline CSS & JavaScript
On Requests

Move Static Content Away

Minimize Requests

Reduce DNS Look-Up

Limit Cookies Size
CDN Stands for
Content Delivery
Network
not Canada.
On Processing Speed



                      Elapse Time
                      to Serve a Page
All Web Servers
Aren't Equals



siege -c 250 http://blog.foo.bar
ab -q -n 2500 -c 250 http://blog.foo.bar
How may I serve you?

Add Expire Headers

Compress Content

Minimize Redirect

Workers are your Friends
WordPress Caching Plugins




                            source: tutorial9.net
HTTP Accelerators: Proxy and Cache




                                     source: Varnish Software
Rolling Your Own With nginx
  #compress
  gzip_buffers 32 8k;
  gzip on;
  gzip_types
     text/html
     application/javascript
     text/javascript
     text/css
     text/xml
     application/atom+xml
     application/xml;

  #caching related
  proxy_cache_path /var/lib/nginx/cache levels=1:2
     keys_zone=staticfilecache:180m max_size=500m;

  proxy_temp_path /var/lib/nginx/proxy;
  proxy_connect_timeout 30;
  proxy_read_timeout 120;
  proxy_send_timeout 120;
  proxy_cache_key "$scheme://$host$request_uri";
Rolling Your Own With nginx
  upstream wordpress {
    server 127.0.0.1:81 weight=1 fail_timeout=120s;
  }
  server {
    listen 80;
    server_name blog.foo.bar;
    proxy_cache_valid 200 20m;
    access_log /var/log/httpd/nginx-access.log combined;

   # for debugging, log cache hit or miss.
   log_format up_head '[$time_local] "$request" '
      '$status $body_bytes_sent "$http_referer" '
      '"$http_x_forwarded_for" "$upstream_cache_status"';
   access_log /var/log/nginx/blog.foo.bar-access.log up_head;

   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

   #unless specified, activate the caching
   set $do_not_cache 0;
Rolling Your Own With nginx
 location / {
   # If logged in, don't cache.
   if ($http_cookie ~*
       "comment_author_ | wordpress_(?!test_cookie) | wp-postpass_" ) {
     set $do_not_cache 1;
   }
   proxy_cache_key "$scheme://$host$request_uri $do_not_cache";
   proxy_cache staticfilecache;
   proxy_pass http://wordpress;
 }
 location ~* wp-.*.php|wp-admin {
   proxy_pass http://wordpress;
 }
 location ~* .(jpg|png|gif|jpeg|css|js|mp3|swf|pdf)$ {
   proxy_cache_valid 200 120m;
   expires 864000;
   proxy_pass http://wordpress;
   proxy_cache staticfilecache;
 }
 location ~* /[^/]+/(feed|.xml)/? {
   proxy_cache_valid 200 45m;
   ...
 }
Virtual WordPress Hosting

  server_name www.blog.bar;
  location / {
    proxy_pass http://wordpress/www.blog.bar;
    ...
  }

  server_name www.blog.foo;
  location / {
    proxy_pass http://wordpress/www.blog.foo;
    ...
  }
Questions?

blog.rassemblr.com/tag/wordcampmtl

           @pdeschen

More Related Content

What's hot

How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
Daniel Kanchev
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
Tuyển Đoàn
 

What's hot (20)

Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
Fluent 2012 v2
Fluent 2012   v2Fluent 2012   v2
Fluent 2012 v2
 
High Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlHigh Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nl
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
Introduction to performance tuning perl web applications
Introduction to performance tuning perl web applicationsIntroduction to performance tuning perl web applications
Introduction to performance tuning perl web applications
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website Optimization
 
Harder, Better, Faster, Stronger
Harder, Better, Faster, StrongerHarder, Better, Faster, Stronger
Harder, Better, Faster, Stronger
 
Optimize
OptimizeOptimize
Optimize
 
Presentation1
Presentation1Presentation1
Presentation1
 
Caching in Drupal 8
Caching in Drupal 8Caching in Drupal 8
Caching in Drupal 8
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
 
Seravo.com: WordPress Security 101
Seravo.com: WordPress Security 101Seravo.com: WordPress Security 101
Seravo.com: WordPress Security 101
 
Caching for Cash - Part 4
Caching for Cash - Part 4Caching for Cash - Part 4
Caching for Cash - Part 4
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
 
Frontend Caching - The "new" frontier
Frontend Caching - The "new" frontierFrontend Caching - The "new" frontier
Frontend Caching - The "new" frontier
 
Caching for Cash, part 4 DPC 2009
Caching for Cash, part 4 DPC 2009Caching for Cash, part 4 DPC 2009
Caching for Cash, part 4 DPC 2009
 
Hidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! SiteHidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! Site
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
 
Memcached Presentation
Memcached PresentationMemcached Presentation
Memcached Presentation
 

Viewers also liked (7)

Dec issue 2 2010 sales listing slideshow powerpoint pos one sales
Dec issue 2  2010 sales listing slideshow powerpoint pos one salesDec issue 2  2010 sales listing slideshow powerpoint pos one sales
Dec issue 2 2010 sales listing slideshow powerpoint pos one sales
 
Nov 2010 sales listing slideshow powerpoint pos one sales
Nov 2010 sales listing slideshow powerpoint pos one salesNov 2010 sales listing slideshow powerpoint pos one sales
Nov 2010 sales listing slideshow powerpoint pos one sales
 
приглашение. влияние цвета на внешность
приглашение. влияние цвета на внешностьприглашение. влияние цвета на внешность
приглашение. влияние цвета на внешность
 
This time is different
This time is differentThis time is different
This time is different
 
The Psychology of Running
The Psychology of Running The Psychology of Running
The Psychology of Running
 
My 20 years personal marketing plan
My 20 years personal marketing planMy 20 years personal marketing plan
My 20 years personal marketing plan
 
Marathon Mettle - The Psychology of Running
Marathon Mettle - The Psychology of RunningMarathon Mettle - The Psychology of Running
Marathon Mettle - The Psychology of Running
 

Similar to WordPress Need For Speed

WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
codearachnid_test
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
codearachnid_test
 

Similar to WordPress Need For Speed (20)

WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!
 
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
Caching 101
Caching 101Caching 101
Caching 101
 
High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPress
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
Optimizing wp
Optimizing wpOptimizing wp
Optimizing wp
 
Mastering WordPress Vol.1
Mastering WordPress Vol.1Mastering WordPress Vol.1
Mastering WordPress Vol.1
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018
 
ITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content CachingITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content Caching
 
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
 
Oscon 2011 - ATS
Oscon 2011 - ATSOscon 2011 - ATS
Oscon 2011 - ATS
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

WordPress Need For Speed

  • 1. WordPress Need for Speed Or How I Learned to Stop Worrying and Love the Traffic Load.
  • 2. Who Am I? Background Story Objectives On Rendering Speed On Processing Speed Conclusion
  • 3. Pascal Deschenes Technologist, Nu Echo Co-Founder @pdeschen http://about.me/pdeschen
  • 6. ,, To one who waits, a moment seems a year.
  • 7. A 1-second delay in page load time equals 11% fewer page views. source: Aberdeen Group
  • 8. On Rendering Speed Elapse Time for a Page to Load Completely
  • 9. Play the Page Speed Game
  • 10. Tracking Speed with Google Analytics _gaq.push(['_trackPageLoadTime']);
  • 11. A Web Page in a Browser is like a Jigsaw.
  • 12. On Images Optimize your image resolution Do not rely on browser image scaling Have a (small) favicon
  • 13. On Scripts and Styles Scripts to the Bottom CSS to the Top Combine & Minify Limit Inline CSS & JavaScript
  • 14. On Requests Move Static Content Away Minimize Requests Reduce DNS Look-Up Limit Cookies Size
  • 15. CDN Stands for Content Delivery Network not Canada.
  • 16. On Processing Speed Elapse Time to Serve a Page
  • 17. All Web Servers Aren't Equals siege -c 250 http://blog.foo.bar ab -q -n 2500 -c 250 http://blog.foo.bar
  • 18. How may I serve you? Add Expire Headers Compress Content Minimize Redirect Workers are your Friends
  • 19. WordPress Caching Plugins source: tutorial9.net
  • 20. HTTP Accelerators: Proxy and Cache source: Varnish Software
  • 21. Rolling Your Own With nginx #compress gzip_buffers 32 8k; gzip on; gzip_types text/html application/javascript text/javascript text/css text/xml application/atom+xml application/xml; #caching related proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=staticfilecache:180m max_size=500m; proxy_temp_path /var/lib/nginx/proxy; proxy_connect_timeout 30; proxy_read_timeout 120; proxy_send_timeout 120; proxy_cache_key "$scheme://$host$request_uri";
  • 22. Rolling Your Own With nginx upstream wordpress { server 127.0.0.1:81 weight=1 fail_timeout=120s; } server { listen 80; server_name blog.foo.bar; proxy_cache_valid 200 20m; access_log /var/log/httpd/nginx-access.log combined; # for debugging, log cache hit or miss. log_format up_head '[$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_x_forwarded_for" "$upstream_cache_status"'; access_log /var/log/nginx/blog.foo.bar-access.log up_head; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #unless specified, activate the caching set $do_not_cache 0;
  • 23. Rolling Your Own With nginx location / { # If logged in, don't cache. if ($http_cookie ~* "comment_author_ | wordpress_(?!test_cookie) | wp-postpass_" ) { set $do_not_cache 1; } proxy_cache_key "$scheme://$host$request_uri $do_not_cache"; proxy_cache staticfilecache; proxy_pass http://wordpress; } location ~* wp-.*.php|wp-admin { proxy_pass http://wordpress; } location ~* .(jpg|png|gif|jpeg|css|js|mp3|swf|pdf)$ { proxy_cache_valid 200 120m; expires 864000; proxy_pass http://wordpress; proxy_cache staticfilecache; } location ~* /[^/]+/(feed|.xml)/? { proxy_cache_valid 200 45m; ... }
  • 24. Virtual WordPress Hosting server_name www.blog.bar; location / { proxy_pass http://wordpress/www.blog.bar; ... } server_name www.blog.foo; location / { proxy_pass http://wordpress/www.blog.foo; ... }