Coding/General

How to speed up WordPress: 5 most popular recommendations that DON’T work

How to speed up WordPress: 5 most popular recommendations that DON'T work

Hi my name is Sabrina I’m from Kyiv, Ukraine I swim I like spaghetti I drink a lot of coffee but also I speed up wordpress websites I do this every day I’ve been doing this for the last three years and during these years I never ever had a client who hired me before they tried something to speed up their website by themselves it always starts the same hey Sabrina a while ago we noticed that our website is slow we tried this and that and that thing and another thing and another thing after another thing but basically it stays the same what are we doing wrong I made a list so

I made a list of the most common recommendations that you will find if you google something like how to speed up my website the recommendations that don’t work in most of the cases I’d like to share those with you today and

I will show exactly why those recommendations don’t work hopefully after this talk you will be spending no more time money and effort on things that don’t work but first let’s take a quick look what is happening when the page is loading after you enter a website address or more likely you click the link on another website your browser makes a request to the server where the website is hosted asking to send the data that server processes the request executes

PHP code of the website gets data from database and have the page ready for you as html file which includes text font files to display that text css files to make it look nice images javascript files to empower other functionality except of these basic things in order to serve content to visitor this page needs to connect with other websites and services for purposes like animations sliders chat bots messaging apps payment gateways newsletter subscription

videos social sharing analytics another analytics ads sign-on system comments one more analytics system for example your website would connect to mailchimp server introduce itself mailchimp would response like yeah I know you I recognize your API key I will send your proper data to display subscription form on your website the way you want it to and yeah I will add your new subscribers into your account not random one and so some images css files javascript files would be requested and loaded from mailchimp server now and the same way with other third-party services the more functionality like this you have on your website the more requests you need to make the more data you need to load so where this functionality and therefore these requests are stored at everything that happens on your website comes from wordpress core, theme and plugins considering there is a whole bunch of things we need to request process and display it sounds like a reasonable idea that to make our website faster we need to reduce  the number of those right we’ll get to our

top five recommendations that don’t work in a minute but first let’s take a look at these two websites here is the first one It’s a popular news portal with lots of ads pop-ups sliders videos tons of analytics and an endless list of hot trending news and this all causes into 515 requests and five megabytes of data and here is the second one it’s a tiny website or even business card of someone who walks dogs in the small town north from London it has one large image and three smaller ones a few blocks of text a couple reviews and that’s it no pop-ups no ads etc and understandably it has just 17 requests and weighs less than 1.5 megabytes let’s get back to our recommendations we’ll start with number five four and three altogether prevent

wordpress from making additional requests disable unused plugins combine requests as they all are aimed to the same thing to reduce the number of requests and page size so the idea is the following if we make less requests and our page weighs less we need less time to process those requests and then less time to load everything so you follow this advice you google how to prevent wordpress core from making additional requests and you paste a few lines of code into your functions.php file or use plugin for that and then the next recommendation is to disable unused plugins so you go to your plugins page you look for plugins that are activated but not are actually in use you deactivate them and then to combine css and javascript files almost every caching plugin has a feature for that so you just go to the caching plugin that you use and tick the box there to combine css and javascript files into two separate files but then then you check the number of requests and it has gone down but as soon as you check as soon as you check the timing you’ll see that the actual time that user has to wait before interacting with your website didn’t really change it’s still the same which means your website hasn’t become any faster conversion rate hasn’t been improved and user experience hasn’t become any better why it didn’t work first prevent wordpress core from making additional requests if wordpress core was responsible for your website being slow other websites that use wordpress would be slow as well because we all are using the same core right but that’s not what’s happening

i made a fresh install of the latest version of wordpress this is how it loads a mobile device 3G internet connection it needs 2.9 seconds to get fully loaded on iphone 8 with 3G internet connection in Dullas It makes nine requests and page weight is only 42 kilobytes largest contentfull paint on mobile by google page speed insights is 2.0 seconds and this all without caching without any optimization techniques at all shared hosting and free ssl certificate freshly installed wordpress is fast those requested and page weight

don’t come from wordpress core they come from themes and plugins that we use to get the functionality we need so if there are so many css and javascript files needed for all that functionality what we can do about this another popular recommendation that you probably saw a lot is to combine those requests into one i mean into two so say you have 10 css files on your page and 10 javascript files on your page and you combine them into two separate files one for css another one for javascript so instead of making 10 requests you’re making just two requests however it was a useful recommendation years ago when most of servers were using http 1.1 protocol but you would have hard times finding hosting that still uses http

1 protocol as most of them use http 2 nowadays and here comes the big difference http 1 would process 10 requests one after another so it absolutely made sense to minimize the number of those while http 2 is fully multiplexed which means it allows multiple files and requests to be transferred at the same time and combining files will have less of an impact on loading times in many cases it would even make it worse recommendation number three disable unused plugins this seems like a reasonable one right so you go to your plugins page and check out which plugins are activated and not been in use actually so you can disable them but the thing is it doesn’t really help let me explain at a time when I was working at

WP Rocket one of the clients sent us a support request to help them to speed up their website that site had 400+ plugins activated including four caching plugins at the same time it was an absolute champion i don’t know if anyone has broke this record later on but that was the most impressive one that i’ve seen if you’re listening to this talk at the moment chances are that your website or your client’s website is nothing like this if you are listening to this talk it means you are interested in keeping it nice clean and efficient

i would assume that you keep the core themes and plugins updated you care about what you install you read reviews before activating things and avoid bloating the website at all costs so if you go through the list of the plugins that are activated but not in use it won’t be a slider plugin it won’t be live chat plugin or pop-up plugin or contact form and so on because if you have them activated they are there for a good reason your findings would probably be something like manual backups search-replace import-export plugins in other words, those that are used occasionally and can be disabled effortlessly but the thing is that those plugins don’t do much either unless you interact with them so once you disable them not much is changed in the site’s performance so yeah if your website is a frankenstein like this the idea of disabling unused plugins might be a useful one and a new one but perhaps

it’s not your case so what is your case then chances are your numbers are close to these speed index which indicates how quickly the page displays content a user can interact with around 6 seconds request count 111 and page weight close to 3 megabytes these are average numbers for the

UK reported by google remember those two websites we looked at before let me remind you the numbers news website has 515 requests and 4 megabytes and page weight is four megabytes and dog walker’s website has 17 requests and it weighs 1.3 megabytes so let’s take a look how they both are loading from the same testing server same device and same internet connection this is how news website with 500 requests is loaded and now here is a tiny website with 17 requests user has to stare at a blank screen before anything starts happening for quite a while largest contentful paint on the news website is 2.6 seconds while largest contentful paint on dog walker’s site is

7.8 seconds largest contentful paint is the main content that you see when you just load the website on the first viewport so despite of being quite lightweight this super simple super light website makes their users to wait almost for 8 seconds before they can see at least anything on the screen as you can see it’s neither the size of the page nor the number of requests that makes a web page fast or slow let’s see how those requests are executed and how that data is delivered you probably know what is this it’s called waterfall

it illustrates everything that is happening on the page you won’t be able to see details here but you can see the general picture though first screenshot is a tiny website’s waterfall and we have all those 17 requests displayed here look at this large blank area nothing is happening for a long time and then some requests get processed it takes 11 seconds before user can interact with this lightweight super simple website second screenshot is just a part of the news website loading process it has 500 requests right but only 12 of them get executed before the content is displayed to user so they can interact with that and this happens in just two seconds so while user is already enjoying the website’s content the rest of the content is loaded in the background nice isn’t it the next recommendation we see a lot number two in our list enable cdn first how content delivery network works say your web host has a server in

London without CDN when user requests your website he gets it delivered from London with CDN when user requests your website he gets it delivered from one of the CDN servers across the globe now which way is faster let’s see it highly depends on how fast your web host’s servers are how fast CDN’s servers are where CDN servers are located and how CDN decides which server to use to serve your website when the request comes in but even these are not those questions that are mostly important the most important question is where your audience is take a look at this website it’s a SaaS startup Reply.io it’s a sales engagement platform that automates personal email outreach calls and tasks if you check the location of their users you will see that the majority is coming from the

US with another big chunk of users coming from the UK as you can imagine both locations are important for their business and they want their website to be loading fast on both sides of the pond it makes sense for them to use CDN to serve it equally fast everywhere now if you run the same check on Franco Manca’s website pizza chain with delicious pizza good vine and incredibly long queue to be seated you’ll find out that 93% of their visitors come from the

UK and there is no wonder actually it’s a UK chain right so they don’t care how fast their website is is in australia they want their website to be as fast as possible for visitors from the UK they would benefit the most if they won’t be using CDN but instead if they make sure that they have a fast server located in the UK the closer to London the better as more than half of their restaurants are located in London if website audience is not spread all over the world but comes from the certain area chances are that CDN won’t make user experience better most likely it would make it worse

i wrote a detailed article about it for Cloudways blog feel free to check it out and the last one but not the least and my personal favorite one change your web host or upgrade your hosting plan a few years ago one development company contacted me they just finished development of a brand new website for their client it looked beautifully it functioned as it was expected to but it turned out to be tremendously slow they just couldn’t hand it to a client that way so they implemented some caching they did some basic performance optimization things it didn’t work they contacted their hosting provider a good one by the way and asked them what can be done about that   and they were recommended to upgrade their hosting plan and they did that and it really mitigated an issue a little bit but just in two weeks

it became as slow as it was front end was still slow back end was hardly usable because if more than two people would log in the same time just nothing worked so they hired me and told me the whole story and I was really surprised at that time that their hosting provider support would recommend them to upgrade their plan instead of doing just that one thing that would really help them to fix the problem to profile their code to find the issue fix it and live happily but that’s an ideal word world right as I learned later it’s like a common response

 if you ask your web host what can be done about your site speed they would recommend you to upgrade your hosting plan though it doesn’t seem nice from their side i’m convinced that it’s our responsibility as developers not to be fooled like that if your newly created website that doesn’t have any traffic yet or is hosted on staging loads slowly clearly, the issue is with your code not with resources on your server upgrading hosting plan or moving to another host with more resources for example might mitigate the issues you have in your code but it would never fix them so you’ll just find out quite soon it’s slow again a quick note obviously,

there are some hosts that are much slower than others but if your site’s code is fine you won’t be experiencing any issues until you get some decent traffic on your website so these were top five recommendations how to speed up your website that don’t work first prevent wordpress core from making additional requests you saw that new freshly installed wordpress is super fast it’s super lightweight even without any caching any optimization techniques on shared hosting with free SSL certificate it loads fast it’s us who make wordpress slow when we install theme plugins we add additional functionality that obviously we need to have on our websites but the wordpress core itself it’s super light and super fast another one the fourth one disable and used plugins yeah great advice unless you don’t have anything to disable the third one combine requests great advice as well was five years ago with servers that were using http 1.1 protocol

but now your website is probably hosted on the server that uses http 2 protocol and this recommendation makes no sense at all another one enable CDN which might work for some websites that have clients all over the world and visitors are coming from all over the world but for local websites or even for a website that has visitors coming from the specific area this would make their website slower not faster and the last one change or upgrade web host you should…

especially if it’s a new website or if it’s not new but you don’t have like really nice amount of traffic on your website your web host is the last thing you should suspect first profile your code make sure nothing goes wrong there and this is not the case in most of the time and then look at your host resources stats make sure they are consumed already and then maybe think about upgrading your hosting plan or moving to another host so all those recommendations are bad let’s have a little break here are two guys in Tampa,

Florida trying to break into a safe in Taco Bell restaurant they brought some tools they make some noises and they flash some lights but still no luck “…to break it wide open and when that doesn’t work they bust out a tool hoping   to bust in the safe a portable circular saw with sparks flying everywhere…” but did you know that you can open that kind of digital safe using just a hammer a beer can your hand or even 

a potato yeah you can do that in case you understand how digital safe works and in case you know what you are doing and no, those recommendations are not bad it’s just that they are not suitable for each and every case for most cases actually so how do you find out what is suitable for your website what will help your website to run faster as you probably already understood the only way to really

see what’s going on there is to look into waterfall it shouldn’t be a guessing game everything is in there in waterfall also here are a few tips that would help you to understand your website speed better if you are a developer they would help you to learn  and in case you are not a developer they will  help you to hire someone to do their work for you without getting fooled so here are a few tips the first one is to use right tools for specific purposes

i use PageSpeed Insights for quick checks i use Lighthouse in Chrome DevTools for analysis and I use webpagetest.org for real user experience testing because it lets you choose between different testing server locations it lets you choose different connection types and devices and everything so if you need to choose like real user experience this is webpagetest.org

then no matter which tool you use forget about scores at all side speed is measured in something very specific in milliseconds when you test site speed always look at largest contentful paint or other metric that displays user experience for example speed index or time to interactive the next one test important pages of your website not a homepage I mean homepage is obviously important but you have other important pages on your website for example if it’s a woocommerce store you would like to test

a single product page you want to test your landing page you want to test your checkout page and others if you’re testing homepage only you can see the entire picture of your website test all important pages on your website and the last one keep an eye on it your website is not stale it’s alive you changed something, your hosting provider changed something you installed some new plugin some of the plugins that you had before was updated it changes all the time so you need to monitor your side speed constantly to see the changes here is the tool that I use for automatic everyday monitoring it’s called SpeedGuard it’s a wordpress plugin you can

have as many pages of your website monitored every day as you need those can be pages of different types posts pages woocommerce products events any other custom post types and also terms taxonomies and category archives it uses PageSpeed Insights API and it measures largest contentful paint it calculates the average across your entire website and notifies you in case it needs your attention and that’s all for free i was looking for a plugin like this and

I couldn’t find one so I built this one you’re very welcome to try it out and please feel free to reach out and let me know if it made your life a little bit easier as it did for me thanks for listening you can get in touch with me via my twitter my website or email my name is Sabrina Zeidan this was five popular recommendations to speed up your website that don’t work if you have any questions feel free to reach out and I hope to see you in a chat in a couple of minutes bye

Ayush Chaurasiya

Read The Latest Information Or Stories.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button