10 Effective and Easy Ways to Speed up a WordPress Site
In the modern age, vast numbers of businesses have taken recourse to relying on the power of the venerable WordPress – so it is of little surprise that the loading speed of WordPress sites is a critical factor for business success. Without prevaricating, sluggish WordPress sites that crawl along like molasses are injurious to your business. That is why it is exceptionally important to ensure a lightning-quick website that is dually SEO and user-friendly, garnering exceptional user engagement alongside precious page views.
In this extensive research article, our conscientious technical team have undertaken various in-house tests to determine the factors that can speed a WordPress website up and ultimately allow it to become as SEO friendly as possible.
The meticulous steps that we undertook to speed up our test WordPress site were the following:
- Installing WordPress Cache Plugin and Leverage Browser Caching
- Optimizing Images
- Enabling gzip Compression, and
- Using a Content Delivery Network (CDN)
After performing these steps, the site already began to exhibit some speed improvements, but it was hardly yet up to the requisite mark. In the subsequent stages, we threw in several additional steps to ensure that our experiment was more comprehensive and above all, oriented towards concrete results. Naturally, to follow the instructions we recommend that you have some intermediate/beginner WordPress knowledge and troubleshooting skills, so you can happily follow each of the suggested instructions.
For the duration of our varied experiments, we used the Google Page Speed Insight tool to measure the actual page speed out of a score of 100. The more elevated the score, the quicker the website. This tool also indicated several negative factors which were responsible for slowing down the WordPress site, and offered suggestions to action the augmentation of the WordPress site’s speed.
Lest we be accused of laboratory testing that fails in the real world, we turned these tools and our expertise to one of our customer’s blog, With sluggish responses, no user was going to have a good first impression, so their aim was to urgently and dramatically speed up their WordPress site. After performing all the following neatly listed steps, we successfully resolved the totality of the customer’s WordPress speed issues and scored an exemplary 100/100 with the Google PageSpeed tool.
Here Are The Top 10 Easy Ways to Speed up Your WordPress Site
- Choose the Best Web Hosting Provider
- Install WordPress Cache Plugin & Leverage Browser Caching
- Optimize Images
- Enable Gzip Compression
- Empty Trash and Optimize WordPress Database
- Use Content Delivery Network
- Reduce Post Revisions and Disable Trackbacks & Pingbacks
- Split Comments & Long Posts Into Pages
- Don’t Upload Videos Directly to WordPress
1. Choose the Best Web Hosting Provider
This should be obvious, but let us be honest, it is not always simple. It is worth thoroughly researching before you put down any money, and is akin to the foundations of your house – the very last area you want be a miser on. Before you even begin to optimize your WordPress site, ensure that your web hosting provider isn’t slowing down your website down to a crawl of its own volition. Web hosting providers, unfortunately, frequently oversell their servers and this will deleteriously impact your server’s critically important response time.
Should your server’s response time be greater than 200 milliseconds (ms), the Google PageSpeed test will signal with an agitated red flag your “reduced server response time”. This probably indicates that your web hosting server is slow, and that you will need to directly contact your hosting provider to improve the server’s response time. The differences between providers can be stark. Here, for example, we conducted a PageSpeed test for our customer’s WordPress blogbefore migrating them onto our hosting environment. The results speak for themselves, and you can cast your eyes over the dramatic test results below.
The test results are indicated alongside the aforementioned red flag helpfully instructing us to generically “reduce server response time”. Thanks Google! This dreadful delay was measured to be around an unacceptable 4.2 sluggish seconds. Thus, due to the server’s poor response time, the PageSpeed score for the website was reduced to a measly 68. We could do much better, as it is said that WordPress sites with page load times under 2 seconds are good. Ideally, however, you should endeavor to make it as fast as you can. Google even suggests, as per their PageSpeed insight, that ideally the server response should be exceptionally rapid and kept under 200 ms.
What Is the PageSpeed Score Of Your WordPress Site? Click Here to Find Out.
Following this primary test, we naturally migrated our customer’s WordPress site to our exceedingly Optimized WordPress Hosting platform, and performed a second PageSpeed test. With a happy green box, the results stand out for themselves:
Google Page Speed Insight Server Response Time Feedback Fixed
After our migration, the server’s response time was reduced to an exceptional 200 ms and the angsty “Reduce Server Response time” error was resolutely resolved, hopefully to never to make an insidious return.
Of course, we cannot always point our finger at the hosting provider, as they certainly are not always the source of the problem. Sometimes you can find poor response times, even from the most exemplary and slick web hosting provider. Very possibly, your website has outgrown its previous hardware, and is quietly demanding that you furnish it with superior technology. Should this be the case, then your current hosting plan is no longer capable of optimally running your website.
In such a case, you will simply have to upgrade your WordPress hosting package to the next plan that is higher up the ladder, or even an entirely new, and significantly more powerful hosting option such as with a VPS. Of course, should you fail to actually see any improvement in your server’s response time after a change of plan, it is definitely time to start researching superior hosting providers, and subsequently switching.
2. Install WordPress Cache Plugin & Leverage Browser Caching
After minimizing the server response time, we will turn our energy towards the next error we will resolve, which is related to the ever-important “caching” of content. Google itself thoroughly recommends caching the static content of your WordPress website and consequently leveraging your browser’s powerful caching facility. Caching the static content will comfortably provide a speed boost for your WordPress site of up to 3 to 7 times.
Install Caching Plugin & Enable Browser Caching
After our extensive testing on a few WordPress Caching plugins, there were three plugins that stood out from the rest of the proverbial pack. These were:
Now, if you do not really want to install a WordPress plugin for whichever reason, it is possible to manually enable browser caching by the addition of an Expires headers code to your .htaccess file.
As we present for you below, the Google PageSpeed score before installing any WordPress caching plugin was a paltry 64 / 100. If you have been keeping up with us, there is an excellent way to fix this as per the error that Google generated for this poor score: ‘Leverage browser caching’!
Google Page Speed Insight Score Before Enabling Caching Plugin
Now, clearly, that is not good enough, so we decided to install the W3 Total Cache plugin for our content caching needs. After the installation, we eagerly retested the page speed and the results were exemplary.
After installing W3 Total Cache caching plugin
Google Page Speed Score: 83 / 100 (improved)
Reason for this improvement: Leverage browser caching error is 95% corrected.
To speed up WordPress, the W3 Total Cache plugin helpfully and intelligently sets the expiration times for all internal scripts to sensible durations. For example, your CSS scripts will be cached for 7 days, images will be cached for 30 days, and so on. After setting up this useful internal caching, the ‘leverage browser caching’ warning was 95% corrected.
Google Page Speed Insight Score After Enabling Caching Plugin
95% of errors under the Leverage browser caching were then corrected. For those keeping track, that leaves 5% of the errors extant. Unfortunately, these were due to 3rd party scripts like Facebook and Twitter, for which this tool is unable to set caching. There is little to be done about this, as you do not control the caching of such third-party data. Not to worry, though, the effects are likely small, and thus you should not unduly worry about completely vanquishing the “leverage browser caching” error.
To be clear, these characters greatly enhance such files for human legibility, but are completely unnecessary for computers and web browsers to process. The removal of unnecessary characters and redundant code can greatly speed up WordPress by reducing page size by a hefty number of kilobytes.
Here, we present the WordPress page speed results showing us some feedback about minimizing our CSS and JS files.
Google Page Speed Insights Minification Warning
According to the results, it is possible to further augment our speed by both reducing the number of calls to CSS & JS and by minimizing its page size.
WP-Minify Plugin Minifies the CSS, HTML & JS
Please note, that although some caching plugins such as W3 Total Cache & WP Fastest Cache offer minification as an additional feature, we chose to use the WP Minify plugin to perform our minification. Please ensure that you activate only one (1) minification plugin/plugin-option active at once. Otherwise it is highly likely you could encounter various desultory plugin conflicts, such as between W3 total cache and WPMinify.
Before installing any Minification plugin
Google Page Speed Score: 83 / 100
Reason for this poor score: Minify CSS, JS and HTML
Google Page Speed Insights Feedback for JS and CSS Minify
After installing WP Minify, we actioned the page speed test and results are as following.
After installing WP Minify plugin
Google Page Speed Score: 84 / 100 (improved)
Google Page Speed Insight FeedBack Fixed By WP-Minify Plugin
It is perhaps not a colossal difference, but every bit counts. Especially for mobile devices. Occasionally, even after installing your minification plugin, these warnings may persist partially unresolved.
4. Optimize Images
A WordPress site with exquisite hi-resolution images looks stunning, and will undoubtedly capture the valuable attention of more readers than a traditional text-based WordPress page. But there’s an unfortunate catch – as you upload more images, or increase their resolution and quality excessively, the size of your WordPress will only balloon, which will in turn ultimately cause lackluster website speed.
To dutifully avoid and minimize these issues, it is imperative that you optimize your images before proceeding to publish them.
Free Online Tools to Optimize Images
There exist various powerful online tools, such as Optimizilla or Image Optimizer to optimize your images without deleteriously affecting their quality. These tools are straightforward – you upload your images, select whichever options are relevant/desired, and subsequently download the optimized images.
We particularly love Optimizilla, as you can batch optimize 20 images at a time and additionally select your choice of both compression ratio and image quality.
Top WordPress Plugins to Optimize Images
WordPress has a legion of plugins that will automatically optimize your images as you upload them. Here is a taste, with several listed below:
We went with the most popular option, and thus from this list, we settled on the WP Smush plugin, installed it on WordPress and proceeded to conduct our performance test. Back to Google’s useful tools, the following test results were obtained before and after image optimization.
Before installing any Image Optimization plugin
Google Page Speed Score: 84/100
Reason for this poor score: Images are not optimized.
Google Page Speed Insight Score Before Optimizing the Images
We used the WP Smush Image Optimizer plugin to optimize the blog images automatically.
WP-Smush Plugin Optimizes the Images
The test results after WP Smush plugin is activated. Notice that the warnings relating to the optimization of the images has disappeared.
After installing WP Smush plugin
Google Page Speed Score: 92/100 (improved)
Reason for this improvement: WP Smush plugin optimized all the images.
Google Page Speed Insight Score After Optimizing the Images
Please be sure to note that you are only permitted to ‘smush’ 50 images at a time with the free version of WP Smush Image Optimizer. The remainder of the images can be smushed from the WordPress media library as exhibited in the below screen.
Smush Images From WordPress Media Library
If you are still receiving an unhappy image optimization warning, do not unduly stress. The Google PageSpeed tool helpfully provides an optimized version of those images, too. You can download them as shown in the 3rd step. You can then consequently update these images from your DashBoard’s Media library or alternatively update them from your Webhosting account’s File Manager. Additionally, please ensure that your webserver’s cache is cleared if you happen to use a third-party caching tool such Xvarnish. If you do not do this, it is possible that Google with continue showing antiquated images even after your painstaking optimizations.
5. Enable Gzip Compression
When visitors browse to your WordPress site, their browsers download the web pages and proceed to render the content. This is often uncompressed, and if your WordPress pages are gargantuan in size due to the necessary and rich elements that they include, it will necessarily and unfortunately increase the page’s loading time.
There is a handy way around this: by enabling intelligent Gzip compression, you can diminish the size of the transferred responses from the server to the clients’ browsers. This will markedly decrease the requisite seconds to download the resources, minimize data usage, and enhance the rendering speed of your beautiful WordPress site within your client’s browser.
Using Gzip compression, your page’s total size can be reduced by an astonishing 50% to 70% for your client, which, unsurprisingly, will serve to ramp up the speed of your WordPress blog. Of course, when Gzip isn’t enabled, Google’s PageSpeed Insight tool will note this, and warns you to enable compression.
1. Enabling Gzip Compression Using W3 Total Cache Plugin
There is a WordPress plugin for most tasks, and Gzip compression is no exception. A notably popular caching plugin, is the previously-mentioned W3 Total Cache plugin, which permits you to Gzip your WordPress website. To enable Gzip compression, log in to your WordPress Dashboard, travel to Performance → Browser Cache, and place a checkmark within the checkbox entitled ‘Enable HTTP (Gzip) Compression’.
Enable HTTP GZIP Compression Using W3 Total Cache Plugin
2. Enabling Gzip Compression via .htaccess
Moreover, you can also enable the Gzip compression by adding the Gzip compression code to your .htaccess file.
3. Enabling Gzip Compression via Compression Plugin
For a dedicated plugin, install one of the following WordPress plugins to enable Gzip compression.
These plugins add Gzip compression rules in your .htaccess file using the mod_deflate module automatically, so that there is no need to trudge into these files yourself to tweak them.
For an excellent way to determine whether Gzip compression is enabled on your website or not, you can take yourself to test your website here. This perennially useful tool can concretely show you just how many precious bytes (and thus rendering speed and bandwidth) were saved by enabling Gzip compression. Check out the example screenshotted below for a remarkable illustration of just how many bytes we saved and economized on our test website.
URL Compression Test Website
Enabling Gzip compression with one of the above methods should fix Google PageSpeed Insights’ recommendation to ‘Enable Compression’.
Before installing any Compression plugin
Google Page Speed Score: 92/100
Reason for this warning: Compression is not enabled.
For this example, we enabled Gzip Compression via the W3 Total Cache plugin, and you can thus note that the Enable Compression warning is now removed, with the result below.
After installing W3 Total Cache plugin for compression
Google Page Speed Score: 92/100
Reason for this improvement: The Enable Compression warning is resolved.
Google Page Speed Insight Score After Enabling GZIP Compression
Fixing Above The Fold Content Warning
Now, you do not even have to take recourse to a plugin. If you wish to avoid loading yet another plugin, you can simply add the following code to your functions.php file.
/*Add async to all scripts*/
# Add async to all remaining scripts
return str_replace( ' src', ' async="async" src', $tag );
add_filter( 'script_loader_tag', 'js_async_attr', 10 );
Now, to fix the same warning for our CSS, we went and used a WordPress plugin called Autoptimize. After installing this plugin, go to Settings → Autotomize. In the Autoptimize Settings, click on the ‘show advanced settings’ button located on the top right corner. Please ensure that ‘minify’ is not active with W3 Total Cache or WPminify as it may well generate frustrating conflicts with Autoptimzer.
Once the advanced settings are populated and tweaked, scroll down to the CSS Options section. Check the checkbox Inline and Defer CSS, paste the fold CSS code (URL suggested by the google page Insight Tool under section “Eliminate render-blocking”, Open each URL on browser and retrieve the fold .css code), and click on the ‘Save Changes and Empty Cache’ button.
After meticulously undertaking these steps, you will be able to regard Google’s tool without any mention of a warning regarding any such above the fold render blocking.
Google Page Speed Score: 100/100
All Warnings Are Fixed For Desktop
All Warnings Are Fixed For Mobile
Remember, Google’s PageSpeed Insights is a perennially useful performance tool that assists you in the identification of the many ways in which you can strive to optimize your website. However, it is rarely worth developing an obsession about scoring a perfect 100/100, as it is common for some scenarios to be essentially unfixable.
6. Make Sure To Empty the Trash and Optimize the WordPress Database
Prolonged use of WordPress brings with it a database that probably contains volumes of data that you do not have much use for. For example, each and every time you save a new post or page, WordPress will happily create a revision of that post or page and subsequently store in within the ever-expanding database.
For instance, should you edit a post 10 times, you may have 9 separate copies of that post stored as revisions. While sometimes helpful, this accumulation of data rapidly adds vast quantities of rarely-accessed data to the creaking tables of your database, unnecessarily bloating them and causing access to them to slow.
By the judicious removal of unwanted revisions, drafts, moderated comments, trash pages/posts, spam comments, trash comments, orphan post meta, and any other unnecessary data, you can retain a sleek, clean, optimized and safe database. It is worth the trouble, as by the simple act of undertaking to optimize your database, you will dually enhance your website’s speed and crucially, its efficiency
Optimize WordPress Database Using WP-Optimize
Top WordPress Plugins to Optimize Database
Listed below is a sampling of choices of the favorite WordPress plugins which are used to optimize a WordPress database.
These plugins scrape away all unwanted cruft from your WordPress database and perform general MySQL database optimization queries without accessing PHPMyAdmin.
Some such plugins, as in the case of WP-DB Manager allow you to schedule dates for regular and consistent database optimization. Always ensure you take a database backup before allowing any plugin to touch or optimize your database!
7. Use Content Delivery Network
An adept CDN also promotes swifter page loads, consequently lifting your Google page rankings, since poorly performing websites that load sluggishly are significantly penalized by the ranking algorithms of the most popular search engines.
Thankfully, setting up a CDN to work with WordPress is straightforward. Indeed, it can be completed within 5 minutes (!), using a caching plugin like W3 Total Cache. Should you wish to integrate a CDN with your WordPress website, please cast your eyes towards our friendly and knowledgeable Tutorial.
Of course, to illustrate the benefits of a CDN for your WordPress site, we necessarily had to perform a quick test in our hi-tech lab for you.
The average Response Time before enabling any CDN on our WordPress website was 124.721 ms.
Response Time Of A WordPress Website Before Enabling CDN
After enabling a CDN on WordPress website, the response time decreased to 26.346 ms.
Response Time Of A WordPress Website After Enabling CDN
8. Reduce Post Revisions and Disable Trackbacks & Pingbacks
Reducing Post Revisions
The WordPress Revisions System is architected to retain a record of each saved draft or published update. While quite useful (it enables you to browse previous versions of your articles and restore them if necessary, after all), it can tremendously increase the size and volume of any WordPress database.
For instance, say your article has passed through 10 revisions, then the WordPress Revision System will store each and every one of these revisions in its database which will balloon its data footprint by an astounding 10 times.
By default, WordPress will continue to save an unlimited and unrestricted number of revisions, but you should and indeed can limit it to drastically more practical value (say 4 to 5). To achieve this, simply add the following code to your wp-config.php file.
define( 'WP_POST_REVISIONS', 5 );
List of Post Revisions
Should you desire to completely disable the WordPress post revision system, then simply proceed to add the following one line code in wp-config.php file.
define( 'WP_POST_REVISIONS', false );
Please note that WordPress’s post revision is exceedingly useful for bloggers, so we do not wish to recommend that you disable it entirely. For your peace of mind, make sure you always retain some revisions of your work.
Disabling Trackbacks & Pingbacks
Every instance in which another blog or website links to your website, you will receive a notification, which subsequently updates the database for that particular post, ultimately serving to clutter your server’s resources.
If you do not wish for this, then Trackbacks and Pingbacks can be disabled from the WordPress Discussion Settings. Once logged into the WordPress Dashboard, proceed to Settings → Discussion, and then uncheck the first two checkboxes as demonstrated in the image below.
Disabling Pingback and Trackback
9. Split Comments & Long Posts Into Pages
Sans question, it is fortuitous indeed to garner an engaged audience which comments en masse on your blog. Unfortunately, such activity generates a potential adverse effect: loading those comments may dramatically slow your website’s loading speed.
WordPress has helpfully incorporated a feature entitled ‘break comments’ to fix this. Simply go to your Settings → Discussion admin page and check the checkbox entitled ‘break comments into pages’.
Break Comments Into Pages
Should your posts happen to consist of prolonged tracts of prose, combined with a copious use of pretty images, your website’s loading speed may suffer. A simple and effective solution exists: split these pesky posts into separate pages.
Simply add the following code snippet at whichever point you desire a page split. Please ensure that you add this code line in the Text mode rather the Visual mode.
All content added below < !–nextpage–>, will appear in next page of the post, and at the end of the page, you will see pagination links as demonstrated below.
Next Page Option
10. Don’t Upload Videos Directly to WordPress
Directly uploading video content can be a heavy drain on the potential bandwidth to your website. Your Web Hosting Provider may well levy additional charges for such use, thus, you have one good reason to avoid performing such an action.
Secondly, lengthy or hi-resolution videos may colossally increase your backup size, leading to a situation where restoring your website from backups can be a much more herculean task.
Since you probably do not wish for the above scenarios, you can directly upload your video to one of the following popular video hosting providers, and subsequently, use an embedded link.
Embedding a YouTube video on WordPress is thankfully elementary. First, simply find the video you wish to embed from YouTube. Then, click the Share link and copy the relevant video URL.
Copy Video URL From YouTube
Finally, paste the video’s URL directly into your post and click on the Update button, embedding it automatically.
Paste YouTube Video URL in WodPress Post
We have listed the 10 most effective and popular tweaks to unleash the potential speed of your WordPress website. Our diligent researchers working in their laboratory have, in our view, proved that an effective implementation of such tweaks can dramatically improve the loading speed of your WordPress website. Should you ever encounter a WordPress installation that seems to move as quickly as a snail taking a day off work, you will have these practical tips to doubtlessly ameliorate and improve the page’s speed scores.
The following pretty graph represents the Google PageSpeed score after each tweak we implemented on the WordPress blog.
Google Page Score Vs. WordPress Tweaks
Do you happen to know alternative and effective ways to speed up WordPress sites and improve their loading times? Anything is tremendously valuable, particularly when milliseconds can matter for the customer. Please share any performant ideas with us in the following comments section!
Should you require our aid to improve the PageSpeed score of your WordPress website, please also drop your website name in the comment section and we will endeavor to get back to you.
Rahul is CEO at AccuWebHosting.com
. He shares his web hosting insights at AccuWebHosting blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, Windows and Linux hosting platforms.
Latest posts by Rahul Vaghasia (see all)
(Visited 2,422 times, 2 visits today)