a crash course inscaling wordpress
DESCRIPTION
WordPress.org's Andrew Nacin will join us again for a session where he shares some tips and ideas around scaling WordPress in the enterprise.TRANSCRIPT
![Page 1: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/1.jpg)
A Crash Course inScaling WordPress
![Page 2: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/2.jpg)
A Crash Course inScaling WordPress
or: let me at leastshow you what is possible
(in 8 minutes)
![Page 3: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/3.jpg)
A Crash Course inScaling WordPress
or: let me at leastshow you what is possible
(in 8 minutes)
![Page 4: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/4.jpg)
A Crash Course inScaling WordPress
or: let me at leastshow you what is possible
(in 8 minutes)[and then I'll take questions]
![Page 5: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/5.jpg)
• Andrew Nacin• Lead Developer for WordPress• Washington, D.C.
• Work for WP founder Matt Mullenweg(Don't work for Automattic or WP.com)
• Full time on WordPress (the project)and WordPress.org (the site)
![Page 6: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/6.jpg)
WordPress can scale
(no, really!)
![Page 7: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/7.jpg)
WordPress can scale
(and it's easy!)
![Page 8: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/8.jpg)
nginx
![Page 9: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/9.jpg)
nginx
![Page 10: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/10.jpg)
nginx
![Page 11: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/11.jpg)
nginx
![Page 12: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/12.jpg)
nginx
![Page 13: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/13.jpg)
nginx(with PHP-FPM)
![Page 14: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/14.jpg)
• nginx is a web server (like Apache or IIS)• nginx is better• nginx is so much better it isn't even funny
• Well-tuned Apache can serve a few hundred requests a second
• nginx can serve 10,000 requests/sec and up
![Page 15: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/15.jpg)
nginx can be a…
• request router/load balancer (layer 7)
• load balancer (layer 4)
• front end proxy (often proxying to Apache)
• web server (using PHP-FPM)
• cache (fastcgi_cache and proxy_cache)
![Page 16: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/16.jpg)
nginx can be a…
• request router/load balancer (layer 7)
• load balancer (layer 4)
• front end proxy (often proxying to Apache)
• web server (using PHP-FPM)
• cache (fastcgi_cache and proxy_cache)
and it is all of these things for WP.com and WP.org
![Page 17: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/17.jpg)
If you can't switch out Apache(because reasons)
Try to still still use nginxas a front-end proxy
and caching layer
![Page 18: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/18.jpg)
At the PHP level:
Use the latest version of PHPfor security and performance
Turn on PHP opcode cache,also called a PHP accelerator
• APC (until PHP 5.5)• Zend Optimizer+ (PHP 5.5 and up)
![Page 19: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/19.jpg)
Inside WordPress (Objects)
Enable object caching in WordPress• stores objects in a key-value store like
APC, Memcached, Redis, and WinCache– APC for one server, Memcached for multiple
• avoids database queries• improves speed and performance• lowers memory consumption
![Page 20: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/20.jpg)
Inside WordPress (DB)
Have multiple database servers?Use HyperDB by Automattic.• splitting reads/writes• master/slave setups• DB failover• sharding• multiple databases• multiple datacenters (mind blown)
![Page 21: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/21.jpg)
Inside WordPress (Debugging)
• Use the Debug Bar pluginby the WordPress core team
• It's like Firebug or the Web Inspector,but for WordPress
• Inspect queries, cache hits, performance• Watch for errors and deprecated notices• General debugging• Look for issues with themes and plugins
![Page 22: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/22.jpg)
Inside WordPress (Page Caching)
• Temporarily Caching entire pages andserving those pages as fast as possible– nginx can do most of this for you
• Batcache by Automattic
(You may have also heard of W3 Total Cache & WP Super Cache)
![Page 23: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/23.jpg)
At the hardware level:
(Solid-State Drives)SSDs
![Page 24: A crash course inscaling wordpress](https://reader033.vdocuments.us/reader033/viewer/2022042714/54c824914a79596e068b4569/html5/thumbnails/24.jpg)
one server, 10,000 requests/sec
864,000,000requests a day