Top Banner
WordPress Performance Timothy Wood @codearachnid www.ImagineSimplicity.com || www.codearachnid.com
15

WordCamp RVA 2011 - Performance & Tuning

May 08, 2015

Download

Technology

Timothy Wood

This is my presentation from WordCamp RVA 2011 on Performance and Tuning WordPress
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WordCamp RVA 2011 - Performance & Tuning

WordPress PerformanceTimothy Wood @codearachnidwww.ImagineSimplicity.com || www.codearachnid.com

Page 2: WordCamp RVA 2011 - Performance & Tuning

How do you percieve performance?

Page 3: WordCamp RVA 2011 - Performance & Tuning

Change behavior to influence perception

Percieved Performance:Responsive● Feedback● Progressive● Escape or Distract● Describe

Actual Performance:● Optimize● Cache● Minimize● Workflow

Page 4: WordCamp RVA 2011 - Performance & Tuning

Low hanging fruit for WordPress:

● Frontend○ Minimize○ Sprites

● Caching○ Asset delivery○ Chunking

● Application ○ Theme○ Plugins

● Server Setups○ OS choice & tweaking

Page 5: WordCamp RVA 2011 - Performance & Tuning

Battle of the brawn

● Process based● Req increase RAM ● Gobs of features● More use cases

● Event based● RAM use is stable● Speed > features● no .htaccess

Like Apache, Nginx has all the features you would expect from a leading Web server. It is stable, secure and very easy to configure.

Page 6: WordCamp RVA 2011 - Performance & Tuning

Real world comparisons:

9794 req/5 min32 req/secondOnly site on fresh VPS install, with minimal graphics, scripts, css.

17479 req/5 min60 req/secondOne of several sites on VPS, photographer portofolio, heavy graphics, minimal scripts & css.Stress tests by http://loadimpact.com

Page 7: WordCamp RVA 2011 - Performance & Tuning

Real world comparisions (cont.):

Page 8: WordCamp RVA 2011 - Performance & Tuning

Performance

But wait... There's more!

- WP Plugin: nginx Compatibility - Pretty URLS:

/etc/nginx/sites-available/nginx.conf

if (!-e $request_filename) {rewrite ^ /index.php last;

}

Page 9: WordCamp RVA 2011 - Performance & Tuning

Tips for optimizing application layer

Theme:● Simplify & Reduce● Keep Code Updated● Repair MySQL DB● Log Slow Queries● Move CSS to top &

Javascript to bottom

Plugins:● Delete Unused● Combine Functionality● Avoid Bad Plugins

Page 10: WordCamp RVA 2011 - Performance & Tuning

Caching with static content + CDN

Plugins:● W3TC● WP Super Cache● Hyper Cache● DB Cache Reloaded CDN:● Amazon S3 &

Cloudfront

Benefit:● At least 10x

improvement in site performance

● “Instant” second page views

● Reduced page load time● Improved web server

performance● Up to 80% Bandwidth

savings

Page 11: WordCamp RVA 2011 - Performance & Tuning

W3 Total Cache (setup walkthrough)

1. Sign-up for Amazon S3 & Cloudfront2. Install W3 Total Cache Plugin within

WordPress3. Follow W3 Total Cache Instructions within

WordPress admin panel4. Log in to Cloudfront control panel and create

a Distribution for your newly created bucked

Page 12: WordCamp RVA 2011 - Performance & Tuning

CDN explained & expounded

A content delivery network or content distribution network (CDN) is a system of computers containing copies of data placed at various nodes of a network. * The optimal number is somewhere between 1 and 5 hosts (1 main host plus 4 hosts on which to parallelize cacheable resources). As a rule of thumb, you shouldn't use more than 1 host for fewer than 6 resources; fewer than 2 resources on a single host is especially wasteful. It should never be necessary to use more than 5 hosts (not counting hosts serving resources over which you have no control, such as ads). (source: Google Page Speed)

Page 13: WordCamp RVA 2011 - Performance & Tuning

Interface polish & performance

● Yslow, Page Speed, Speed Tracer● Minify and combine all CSS and JavaScript● gZip, image sprites, smush.it● Cleanup your markup● Improve wait messaging

Page 14: WordCamp RVA 2011 - Performance & Tuning

● Build on a good foundation● Pull the weeds of unnecessary code● Optimize browser rendering● Minimize request overhead● Minimize round-trip times● Minimize payload size● Optimize caching● Change perception

What did we learn?

Page 15: WordCamp RVA 2011 - Performance & Tuning

Find me online:

@CODEARACHNID