Speeding up a wordpress site - starting with the basics

Joined
Oct 6, 2016
Messages
24
Likes
24
Degree
0
My main project, an e-commerce site has been up for a few months now. It's mainly monetized through FB and email so speed wasn't top of my list. I've literally done nothing to speed it up. So i'm spending a couple of hours today doing the basics and i thought I would document the process for anybody interested and maybe pick up a few pointers if anyone can spot anything i've missed.

This isn't a tutorial. I'm giving an overview of the steps that I use. You will need to go and figure out some parts for yourself or come back to the thread and i'll help if I can.

Before

I9gfQPf.png


mPs6bOi.png

Ouch.

1. Enable GZip.

This one is easy. I am using CPanel so you just go to Optimize Wesbsite and select Compress all content.

FCxbReI.png


gainz:

Lq2OuWk.png

The score has increased a lot but it's now showing as 2 seconds slower. Odd - i have have noticed this with GT metrix and I don't take it as gospel. It can fluctuate. Anyone else noticed this? Anyway -

2. Optimize images

The first thing I do here is use a plugin:
WP Smush - Image Optimization
https://en-gb.wordpress.org/plugins/wp-smushit/

Gainz:

xcrH6MB.png


1MB off the page size. I could go further with this but if you see the side note below you will see that this is theme related and i'm going to come back to it.

Side note - BUSO Lightning Test

While I was waiting for my images to Smush I thought I would give @Ryuzaki's Wordpress theme a go. I just installed it and tested it then switched it off.

jLEjG2o.png


5BDrmwO.png


So yeah - it's seems a whole 2mb+ of my page size is in my theme. We are re branding after XMAS so part of my plan now is to re skin the site using this theme. This is my i'm getting a low score for optimise images too. in hindsight I DO have a large background image and big slides. As I have said speed wasn't a major concern when i started I just wanted to build a site that looked good quickly. Moving on...


3. Minify JS/ CSS

I'm going to be using W3 total cache for a few things, However in the past I have found that the combine / minify JS/CSS features have always caused me issues. I use W3 Cache for certain things but I use a seperate plugin for this task.

Autoptimize
https://en-gb.wordpress.org/plugins/autoptimize/

gainz:

oLcuzCh.png

40 less requests

4. Browser Caching

W3 Total Cache

https://en-gb.wordpress.org/plugins/w3-total-cache/

T
his is a very comprehensive plugin. I don't use it for everything but I do use it for a few things. It's powerful but if reconfigured it can break your site by causing JS errors and other things. using WooCommerce you have to be careful as the cart relies on JS.

With that said here is what I have done:

Everything is enabled in General Settings apart from minify

Tweak browser cache settings to add expires headers

Gainz:

at6jWSM.png



5. CDN

For this you need an account with a CDN provider. I use MAXCDN. It's a market leader and it is easy to integrate via w3 total cache. It's $9 / mo for a basic account which you can use for two sites.



YTCULg9.png


dxddyVB.png


Getting there.I have identified the main bottle neck which is my theme and it's stupid background image and slides which were a good idea at the time.

I know there are more things to do. I'll be coming back to this and updating it.

My server is:
xA1RhYk.png


In case you are wondering with Cent OS / Cpanel.

Side note 2

I ran the test on the Lightning theme again.

hwTR9K7.png


Xklnusq.png


... I think he might be on to something, guys!

Ill-Be-Back.jpg


 
I know this thread will "trigger" certain people to come in and post their WP speed skills too.

waiting....
 
I wouldn't worry too much about the overall page load time as reported by tools like GTMetrix, or at least I wouldn't look at that one factor alone. I'd recommend looking specifically at the 'Waterfall' tab, and look at it over multiple runs. This will highlight if there's a particular request/resource that's the culprit. For example, bootstrap's CDN, or Google's various CDN's aren't always fast and consistent. Ever so often, I'll see a third party resource file, even from Google, that might fluctuate several hundred milliseconds in load time, likely due to an unusually high load or other technical issue on their servers at that exact point in time. All things considered, if 90-98% of your other requests are performing the same or better, you'll know it's just that one outlier that's the cause of one page load time being higher than you would expect.

As far as gzip, one thing most people never think about is.....at some point the end user's browser needs to unpack those files to see/use them. In certain cases, I've seen overall load time for some resource files increase with gzip, because of the post-processing involved on the browser side.

INB4 Carter posts an example with a world first, -1 HTTP requests, -100ms load time. LOL
Level 11. ∞Time Travel Achieved!
 
The first thing I do here is use a plugin:
WP Smush - Image Optimization
What is the reason you are using this over optimising images (in Riot for example) before uploading them to the server?
 
Mainly laziness but I will probably look at a better process such as that moving forward. Thanks for the kick up the a**! @Andrewkar
 
It wasn't meant to be kick in the a**, but if it was that's cool I guess :wink: I thought that maybe you have a site that is heavily relying on images etc. so that plugin could save you time. Or maybe there are some cool options you are after? I need to check this plugin anyway.
 
it's just part of my standard procedure you are right about optimising first, though.
 
Been doing a bit of research on the whole webspeed thing and a lot of the talk around here saying how much "bloatcode" is in themeforest websites. at first I thought it was being a bit overstated...


absolutely frickin not. I used a webproxy to visit buildersociety and see the get/post requests between my browser and buildersociety vs those of my own wordpress page that runs the themeforest BRIDGE theme. jesus tapdancing christ, If I wasn't afraid it would cripple my progress, I'd jump ship right now.

buildersociety's page/scripts call 28 external domains.
my bridge theme? fucking 77 external calls. are you kidding me?
 
Back