So let's see ...
7 must-follow steps that will help you to maximize your website speed
As you've seen from the previous statistics speed sells. And numbers don't lie ... Countless research papers and benchmarks prove that optimizing your sites' speed is one of the most affordable and highest ROI providing investments!
So let's see 7 essential steps that must be performed in the post-development phase:
1. Updates
It's very straightforward. The Wordpress CMS, the themes and the plugins are constantly improved. And using old, outdated versions obviously won't help you to run a well-performing website.
Always - I mean ALWAYS! - update your Wordpress installation, your theme and your plugins to the latest available version! And always make a backup of your site before installing a new update!
2. Image optimization
If you haven't optimized you images in the development phase or if you want to add an extra optimization layer, you can always use an image optimization plugin to reduce the loading time of your images. I recommend you EWWW Image Optimizer. It's lightweight, reliable and easy to use.
https://wordpress.org/plugins/ewww-image-optimizer/
3. Content delivery networks
So, what is a content delivery network? The content delivery network services (CDN) consist of a network of servers that have been optimized for distributing static files from multiple different geographical locations. These static files include the images, videos, scripts, and much of the content that makes up your website. Unlike your regular web host, these CDN services will have servers located all over the globe, instead of just in one or two data centers. As your static files are duplicated to all of these servers, no matter where your website visitors are located, there is likely to be a server relatively close by.
For example, when someone in India visits your site, the CDN service will connect to a local server in India making things nice and fast! More than that, not all users may visit your site from a quick internet connection, so it's important that your site loads smoothly and efficiently. Plus, you'll create an additional extra level of security. If one server or even an entire data center becomes unavailable, there are plenty of others in the network to ensure an uninterrupted service.
To put it simply, it's a great way to ensure your site loads quickly no matter where the user is in the world! If you want more traffic, happier users, and better conversion rates, you should seriously consider speeding up your WordPress website with a CDN. There are many reliable and affordable services out there.
Of course, you’ll still need a web host to store your WordPress database and other non-static files. However, these two different services will work together in tandem.
UPDATE: I just found out, that we can't enable CDN within WA! So this point could be useful only for external sites.
4. Code optimization
When we are talking about code optimization performed in the post-development phase we need to:
- reduce the total size of the page
- reduce the number of HTTP requests
- make sure that the Javascript scripts are deferred or loaded asynchronously so they doesn’t block the rest of the page from loading
Let's start with the first two issues: the total size of your page and the number of the HTTP requests.
According to SpeedCurve:
Nowadays an average web page is around 3MB in size.
That’s how much data needs to be downloaded when a visitor arrives and it includes images, fonts, text and code.
Reducing the page size and the number of HTTP requests is pretty simple. The goal is to eliminate any unnecessary bytes from the source code by deleting extra spaces, indentation and line spaces while maintaining the readability of the code. The process will reduce the overall size of your website core and front-end files. Other benefits: benefits: reduced network latency, fewer HTML requests, enhanced compression, faster parsing, browser downloading and execution and ultimately better page speed.
And you don't need any coding skills. There are dozens of free, easy-to-use solutions out there. My favorite is MinifyCode:
All you have to do is to select the desired tab (Javascript, CSS, HTML), to paste your code into the input field and to hit the "Minify" button:
And believe me, it may seem a small tweak, but minifying your code can actually drastically improve your loading time.
And of course, there are also plenty plugins that can help you to minify and optimize your code. My favorite is Autoptimize:
https://wordpress.org/plugins/autoptimize/
OK. Now let's talk a bit about asynchronously loaded or deferred Javascript files.
So, when a browser loads a webpage, the JavaScript (and CSS) resources usually will prevent the webpage from being displayed until they are downloaded and processed by the browser. And fact is, some resources need to be downloaded and processed before displaying anything. However, many JavaScript (and CSS) resources are carrying so-called conditional instructions that are only applied in specific cases. More than that, certain Javascript (or CSS) files are simply not needed to render above-the-fold content.
And here's the point: in order to produce the fastest possible experience for your users, you'll have to eliminate any render-blocking resources that aren’t required to display the above-the-fold content.
The first solution: you need to load your JavaScript resources asynchronously. In this case the given Javascript resource is downloaded during HTML parsing and the HTML parser will be paused to execute the Javascript once it has been downloaded.
The second solution: you can also defer the Javascript resources. The defer attribute also downloads the file during the HTML parsing, but it only executes it after the parsing has completed. Also, in this case the scripts will be executed in order of their appearance on the page.
The best plugin to accomplish the task: Async JavaScript:
https://wordpress.org/plugins/async-javascript/
Which is is fully compatible with the aforementioned Autoptimize plugin.
And for the last time: while these issues may seem unimportant, I can tell you from my own experience that eliminating the render-blocking JavaScript and CSS resources from your above-the-fold content will also help you to improve the loading speed of your site.
5. Database optimization
Basically, the database optimization revolves around getting rid of garbage data and useless content from cluttered databases, shrinking them in size and making it easier for website hosting servers to fetch the requested content efficiently, within minimum processing cycles.
The most important aspects:
- use as few plugins as possible (as we already discussed); usually each plugin will add some data to the Wordpress database increasing its size
- automatically purge the Wordpress trash by adding the following line to your wp-config.php file: "define('EMPTY_TRASH_DAYS', 10 );" (without quotation marks!); in my example 10 is the number of days before garbage data is automatically deleted (change as appropriate)
- limit, disable and delete the post revisions; the CMS automatically keeps track of the content created on the CMS and makes all of it available for future changes; obviously, that means unnecessary server processes through additional database entries that actually aren't required; by controlling the number of the stored revisions you can significantly reduce the size of your Wordpress database; and again, all you have to do, is to add one line to your wp-config.php file;
- if you want to disable the revisions: "define( 'WP_POST_REVISIONS', false );"
- if you want to limit the number of the stored revisions (let's say to 10): "define( 'WP_POST_REVISIONS', 10 );"
And of course, you can manage your revisions via plugins too. For example:
https://wordpress.org/plugins/revision-control/
6. Compression
According to Google:
Every single day the cyber world sees 99 years of human years wasted due to uncompressed web content.
In my opinion the above information is simply hair-raising. Especially today, when most of the latest web browsers support content compression capabilities and automatically negotiate Gzip compression for all HTTP requests.
Yes, it's true, the uncompressed content hurts especially the bandwidth-constrained users who are receiving the requested web content in agonizingly lengthy page load times ... but, it's still an issue.
The solution? Use a plugin that will allow you to enable Gzip compression. Basically, Gzip finds the similar strings and code instances, and replaces them temporarily with shorter characters. The browser will decompress the Gzip files, bringing them back to their original shape. Simple as that. Any reliable caching plugin will allow you to enable the Gzip compression. For example the famous W3 Total Cache:
https://wordpress.org/plugins/w3-total-cache/
A few words of caution though:
- do NOT compress with Gzip (already compressed) images
- PDF or other binary data
- Gzip data only in the range of 150-1000 bytes in size
- do NOT compress content for old browsers
It's really simple. The speed of the compression must be faster than the time taken in delivering the content uncompressed. Not following the above recommendations actually could increase the file size and the page load time due to the overhead of compression and decompression.
Note: the Gzip compression can be enabled via the .htaccess file too.
Believe it or not, enabling the Gzip compression can reduce the size of the transferred response by up to 90% (!).
7. Cache
The web cache is the mechanism of temporarily storing copies of a given web content to satisfy subsequent user requests from the cache database when specific conditions are met. Obviously, this process reduces the number of client-server round trips taken in delivering static website content to requesting browsers.
In other words: if your hosting provider (or hosting plan) doesn't provide server-side caching, you can use a plugin to deliver cached copies of the requested content instead of rendering it repeatedly in response to every single user request that pings the server. The most reliable and efficient caching plugins are W3 Total Cache
https://wordpress.org/plugins/w3-total-cache/
and WP Super Cache
https://wordpress.org/plugins/wp-super-cache/
Also, to leverage caching, you can change the request headers of your resources via your .htaccess file. Here's the code:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
The above code segment tells browsers what to cache and how long to "remember" it. It should be added to the top of your .htaccess file.
And that's it my friends!
If you have any comments, further questions or update requests please don't hesitate to react! Like, comment and share!
Analysis Error
Error resolving host lailasiterubixwpamdin.com: non-existent domain
GTmetrix had problems resolving your site's hostname. Please check that the URL was entered correctly and make sure your site's DNS is properly configured.
Please see our FAQ on how to fix this error.
pls help
Does it perform complex operations?
Does it load many content assets and scripts?
Does it increase the number of database queries to each page request?
Does it perform requests to external APIs?
And then even if I answer yes to any of the above, what are my options? Don't install the plug? But what if PageSpeed advice says I need the plugin because my site is slower than a snail and turtle race?
My head's aching from the catch-22s in SEO'ing!
I really appreciate what you're doing here, Zed ... despite my moaning, I am slowly working my way to enlightenment here ...
The more I read , the more I understand how much I don't know.
Most of this stuff is too technical to me.
For each section here, I need a separate tutorial for dummies what exactly I need (if I really need) to do.
I'm afraid of touching any code without such instructions for dummies..
Maybe an idea for more training sets.
Thanks
Mary
CLEAR!!!
ZAPPOW
Just kidding, please tell me what the heck this means?
Please advise.
Thank you & kind regards,
Nurse Becca