Top Banner
Performance Tweaks for Shared Hosting Jon Brown j.Brown Studios @jb510 http://jbrownstudios.com Saturday, October 6, 12
45

Optimizing WordPress Performance on Shared Web Hosting

May 08, 2015

Download

Technology

Jon Brown

Techniques for speeding up WordPress when hosted on common shared web hosting
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: Optimizing WordPress Performance on Shared Web Hosting

Performance Tweaks for

Shared HostingJon Brown

j.Brown Studios@jb510

http://jbrownstudios.com

Saturday, October 6, 12

Page 2: Optimizing WordPress Performance on Shared Web Hosting

Tweaking WP Performance in 3

actsAct 1 - Inside WordPress

Act 2 - On your Shared Server

Act 3 - O! your Shared Server

Saturday, October 6, 12

Page 3: Optimizing WordPress Performance on Shared Web Hosting

Prelude

Saturday, October 6, 12

Page 4: Optimizing WordPress Performance on Shared Web Hosting

What am I going to cover today?

Performance Tweaks you can make on or with most shared hosting (not that

they won’t help on any hosting)

Saturday, October 6, 12

Page 5: Optimizing WordPress Performance on Shared Web Hosting

What am I not going to talk about today?

Geeky tweaks that are only suitable to VPS/Dedicated servers

(ie. APC, Memcached, Hyper DB, etc...)

Saturday, October 6, 12

Page 6: Optimizing WordPress Performance on Shared Web Hosting

Where to go for the advanced stu!?

http://wordpress.tv/

http://www.slideshare.net/

Joseph Scott

Barry Abrahamson

Ilya Grigorik

Iliya Polihronov

and many others...

Saturday, October 6, 12

Page 7: Optimizing WordPress Performance on Shared Web Hosting

Measuring Performance

• It’s hard to impossible to measure performance on shared servers

• How to measure anyway...

http://www.webpagetest.org

Saturday, October 6, 12

Page 8: Optimizing WordPress Performance on Shared Web Hosting

Why not use your browser tools?

• FireBug

• YSlow

• PageSpeed

• WebKit DevTools,

• etc...

Saturday, October 6, 12

Page 9: Optimizing WordPress Performance on Shared Web Hosting

WebPageTest.org

Saturday, October 6, 12

Page 10: Optimizing WordPress Performance on Shared Web Hosting

1122

33

Saturday, October 6, 12

Page 11: Optimizing WordPress Performance on Shared Web Hosting

The challenge with shared hosting

• Con"gured to run just about any type of web site

• Generalized not optimized

• Many performance tweaks available to dedicated/VPS hosting can’t be made

• Some performance tweaks you can make... starting in WordPress

Saturday, October 6, 12

Page 12: Optimizing WordPress Performance on Shared Web Hosting

The goal of all opitimization

• Reduce HTTP requests

• Reduce total data transfer

• Reduce CPU load

• Avoid Bottlenecks

Saturday, October 6, 12

Page 13: Optimizing WordPress Performance on Shared Web Hosting

Act 1

Tweaking inside

WordPress

Saturday, October 6, 12

Page 14: Optimizing WordPress Performance on Shared Web Hosting

Inside WordPress

1. Right size/compress images

2. Check for 404’s

3. Keep your DB under control

4. Caching inside WordPress

Saturday, October 6, 12

Page 15: Optimizing WordPress Performance on Shared Web Hosting

Right sizing images

• Upload the maximum pixel size you want to display, not larger

• Compress JPGs to 60-70% (aka 7 out of 12 in PhotoShop)

• Use WP Smush.it on already uploaded images to "x your past mistakes

Saturday, October 6, 12

Page 16: Optimizing WordPress Performance on Shared Web Hosting

Checking for 404’s

WebPageTest.org

or

FireBug / Webkit Dev Tools

Saturday, October 6, 12

Page 18: Optimizing WordPress Performance on Shared Web Hosting

Caching WordPress

• W3 Total Cache

• WP Super Cache

• WP Minify

• Others...

Saturday, October 6, 12

Page 20: Optimizing WordPress Performance on Shared Web Hosting

W3TC Do’s & Dont’sfor shared hosting

• Do test settings

• Don’t assume turning everything up to 11 will work well... it won’t.

• Do take the time to "gure out minifying and combing "les it makes a huge di!erence

• Don’t forget to prime your cache

Saturday, October 6, 12

Page 21: Optimizing WordPress Performance on Shared Web Hosting

W3TC Minify Settings

Try Auto (Performance>General Settings)

Saturday, October 6, 12

Page 22: Optimizing WordPress Performance on Shared Web Hosting

W3TC Manual MinifyUse Manual (Performance>Min"y)

Lists all your CSS and JSfor easy manual additionand ordering

Lists all your CSS and JSfor easy manual additionand ordering

Saturday, October 6, 12

Page 23: Optimizing WordPress Performance on Shared Web Hosting

After Mini"cation

Saturday, October 6, 12

Page 24: Optimizing WordPress Performance on Shared Web Hosting

Before Mini"cation

Saturday, October 6, 12

Page 25: Optimizing WordPress Performance on Shared Web Hosting

Act 2

On your Shared Hosting Server

Saturday, October 6, 12

Page 26: Optimizing WordPress Performance on Shared Web Hosting

On your Server

1. PHP Version

2. DB Cleanup

3. Cloud#are (if your lucky)

Saturday, October 6, 12

Page 27: Optimizing WordPress Performance on Shared Web Hosting

Switch to a newer version of PHP

“PHP 5.2 to 5.3 - WordPress 15% faster”

~ Dmitry Stogov http://news.php.net/php.internals/36484

PHP 5.4 is even faster

Saturday, October 6, 12

Page 28: Optimizing WordPress Performance on Shared Web Hosting

How to change PHP versions

• Ask your web host...

• In cPanel "nd PHP Con"g

• Sometimes set in .htaccess via AddHandler

Saturday, October 6, 12

Page 29: Optimizing WordPress Performance on Shared Web Hosting

PHP 5.2 - 5.3 - 5.4

Saturday, October 6, 12

Page 30: Optimizing WordPress Performance on Shared Web Hosting

Keep Your DB under control

• PHPMyAdmin to Optimize MySQL Tables if you didn’t want to use the WP DB Manager plugin to do it

Saturday, October 6, 12

Page 31: Optimizing WordPress Performance on Shared Web Hosting

CloudFlare free awesomeness

CDN + Site Optimizer + Security

Saturday, October 6, 12

Page 32: Optimizing WordPress Performance on Shared Web Hosting

Some Host Integrating CloudFlare with cPanel

• http://www.cloud#are.com/hosting-partners

(DreamHost, BlueHost, many more...)

Saturday, October 6, 12

Page 33: Optimizing WordPress Performance on Shared Web Hosting

Enable CloudFlare in your cPanel

Saturday, October 6, 12

Page 34: Optimizing WordPress Performance on Shared Web Hosting

Saturday, October 6, 12

Page 35: Optimizing WordPress Performance on Shared Web Hosting

W3 Total Cachecan control CloudFlare

Saturday, October 6, 12

Page 36: Optimizing WordPress Performance on Shared Web Hosting

One Caveat

Saturday, October 6, 12

Page 37: Optimizing WordPress Performance on Shared Web Hosting

Act 3

O! your Shared Hosting Server

Saturday, October 6, 12

Page 38: Optimizing WordPress Performance on Shared Web Hosting

O! your server

1. CDNs (CloudFlare is Free)

Saturday, October 6, 12

Page 39: Optimizing WordPress Performance on Shared Web Hosting

CloudFlare

CDN + Optimizer + Security

Saturday, October 6, 12

Page 40: Optimizing WordPress Performance on Shared Web Hosting

Setup Cloud#are

1. Setup CloudFlare account (free)

2. Have CloudFlare scan your DNS records (check your records)

3. Repoint your nameservers

4. Done

Saturday, October 6, 12

Page 41: Optimizing WordPress Performance on Shared Web Hosting

Why

• Reduces requests to your server

• Reduces requests to your CDN if you use one

• Adds security

• Optimizer features (I use W3TC)

Saturday, October 6, 12

Page 42: Optimizing WordPress Performance on Shared Web Hosting

So where does it get us?

Saturday, October 6, 12

Page 43: Optimizing WordPress Performance on Shared Web Hosting

Where we started

1122

33

Saturday, October 6, 12

Page 44: Optimizing WordPress Performance on Shared Web Hosting

W3TC Mini"cation

1122

33

Saturday, October 6, 12

Page 45: Optimizing WordPress Performance on Shared Web Hosting

W3TC + CloudFlare

1122

33

Saturday, October 6, 12