17 ways to speed up your wordpress website

28
www.limecanvas.com for WordPress Sydney

Upload: lime-canvas

Post on 14-Jun-2015

912 views

Category:

Internet


1 download

DESCRIPTION

I run through multiple ways that you can, hopefully, increase the speed of your WordPress website. It starts off pretty basic and then get's into more tech solutions towards the end. Presentation for WordPress Sydney Oct 2014

TRANSCRIPT

Page 1: 17 ways to speed up your WordPress website

www.limecanvas.com for WordPress Sydney

Page 2: 17 ways to speed up your WordPress website

Google likes fast sites = higher rankings

People don’t like to wait = they will go elsewhere

Fast sites can serve more visitors = better conversion for you

Slow sites just plain suck!

Page 3: 17 ways to speed up your WordPress website

Strips out whitespaces from CSS and JavaScript files.

i.e. files are smaller so download faster

Better WordPress Minify

https://wordpress.org/plugins/bwp-minify/

Note: not all JavaScript files like to be minified. You can also specify exclusion files to get around this issue.

Page 4: 17 ways to speed up your WordPress website

Stores a “built” html web page & serves that to visitors rather than dynamically build PHP page each time.

Caching can fit into different infrastructure layers:

• Browser Caching Sending correct expiry headers on your web pages/elements Browsers can then store and use already downloaded pages

• Server Caching Usually a built-in web server module or an executable running interacting with web server process. Or use caching plugins.

Page 5: 17 ways to speed up your WordPress website

WP Super Cache - https://wordpress.org/plugins/wp-super-cache/

• Good introductory method of caching

• Minimal options – easy interface

W3 Total Cache - https://wordpress.org/plugins/w3-total-cache/

• Does a lot more than just caching: Minify, CDN, WP-CLI support etc.

• Interface has a lot of options

• Needs to be set up properly

• Better for Nginx

Page 6: 17 ways to speed up your WordPress website

You want to reduce these as much as possible.

e.g. Facebook Likes, Twitter Feeds, RSS, Instagram Pics

Do you really need them all in a sidebar? On all pages?

Your page will stop loading and wait until the external service (server) responds.

You don’t have any control over the external service!

Page 7: 17 ways to speed up your WordPress website

If you’re a WordPress developer, consider using or developing a plugin which caches the external API data.

Do you really need to ask Twitter ever second for your latest 3 Tweets? How often do you Tweet?

Think cache. Think WordPress transients.

http://bit.ly/1r5TL8X

Page 8: 17 ways to speed up your WordPress website

Consider each plugin you “need”.

Every plugin

– comes with libraries (files) that need to be loaded from the web server (for each page you use them on)

– calls the database (many times)

Does your plugin do one job or 30 different things?

Try to reduce the number of plugins you have or replace bloated ones.

Page 9: 17 ways to speed up your WordPress website

Super themes do everything but walk the dog these days.

What % of the features do you use on a super theme?

Can you turn them off or are they loaded on every page?

Can you replace with a simple theme & some specific plugins?

Page 10: 17 ways to speed up your WordPress website

Cameras and image editing software embed Meta Data in images

– Colour Depth, Algorithm, Watermark, Geo & EXIF Data, …

Website visitors don’t need this = get rid of it!

Plugin: WP Smush.it

Developers: grunt-smushit, grunt-contrib-imagemin

PC: PNGGauntlet, Caesium Mac: ImageOptim

Note: JPGs compress better than PNGs

Page 11: 17 ways to speed up your WordPress website

Loading data (images) outside screen area (viewport) only when a user scrolls there.

Easy for a developer to implement or use a plugin e.g. BJ Lazy Load

We page only loads data that is needed by the viewport.

This can drastically decrease initial page load time!!

Page 12: 17 ways to speed up your WordPress website

CDNs are located world wide. Data is downloaded from the CDN server closest to your geo location = faster

Plugin: Jetpack – contains FREE Photon CDN for images

*** FREE! ***

Others (not free): MaxCDN, CloudFlare, WPPronto

Note: W3 Total Cache can connect to CDNs

Page 13: 17 ways to speed up your WordPress website

How fast (or slow) do your web pages load?

Use: Pingdom Website Speed Test

Page 14: 17 ways to speed up your WordPress website
Page 15: 17 ways to speed up your WordPress website

There’s a lot you can do to increase the speed of the server.

Some solutions are quite technical to implement but you need to analyse server data first.

What’s eating up all your server resources?

Page 16: 17 ways to speed up your WordPress website

Which plugins are using the most server resources?

Use P3 (Plugin Performance Profiler)

Page 17: 17 ways to speed up your WordPress website

Which server resources are being hammered?

Use New Relic (free version is fine)

Page 18: 17 ways to speed up your WordPress website
Page 19: 17 ways to speed up your WordPress website
Page 20: 17 ways to speed up your WordPress website

On shared hosting Upgrade to a VPS or managed hosting

– Managed: Pagely, WPEngine, WPHosting

– Some restrictions on using certain plugins

Have a VPS? Upgrade CPU and/or RAM (memory)

Invest in SSD’s (solid state drives: like a USB stick)

Page 21: 17 ways to speed up your WordPress website

Use ApacheBench – measures Apache performance by simulating server loads (number of visitors & page hits)

How to tune? Depends..

Single site? Multiple Sites? How many clients is Apache configured to use? How much RAM per httpd process is allocated?

Great basic Apache tuning resource: http://bit.ly/123lscP

More advanced Apache tuning: http://bit.ly/1t8tZFl

Page 22: 17 ways to speed up your WordPress website

Apache is very resource hungry.

It loads heaps of modules you may never need.

Replace with Nginx + PHP-FPM ( Pronounced “engine-x” )

Nginx is immensely faster than Apache, scales better and has a lower memory footprint.

Page 23: 17 ways to speed up your WordPress website

Apache vs Nginx + PHP-FPM: http://bit.ly/1DvTQdM

Page 24: 17 ways to speed up your WordPress website

Varnish cache works really well with Nginx and PHP

Nginx (web server for SSL)

Varnish (server cache)

Nginx (web server to pass to PHP)

PHP (application stack)

Reason for Nginx up front is Varnish doesn’t handle SSL termination requests (decryption & passing plain-text)

Page 25: 17 ways to speed up your WordPress website

Stick your MySQL DB on another server

First steps in “scaling out”.

– Scaling up is adding more memory & CPU power to same machine. You will hit a physical limit.

– Scaling out is adding more servers. Limitless.

VPS 1 VPS 2

NGINX MYSQL

Page 26: 17 ways to speed up your WordPress website

Load balancers try to send traffic to least busy server. Use HAProxy

MYSQL

HAProxy

VARNISH

NGINX

PHP

NGINX

PHP

NGINX

Page 27: 17 ways to speed up your WordPress website

[1] pixbay.com

[13] pingdom.com

[14] pingdom.com

[16] wordpress.org

[17] newrelic.com

[18] newrelic.com

[19] newrelic.com

[22] nginx.org

[23] theorganicagency.com

Page 28: 17 ways to speed up your WordPress website