Step-by-Step Guide to Speed up WordPress website
If your WordPress website takes more than 3 seconds to load its no good news for your business. Slow website leads to increased bor UX. WordPress is a great platform if you use it the right way. This guide on “Speeding up your WordPress Website” will help you optimize the most important factors slowing down your WordPress website.
14 Ways to Speed up WordPress
1. Run a PageSpeed test
GTMetrix & Google PageSpeed Insights are the most popular tools to test the page speed of any website. Google PageSpeed Insights is my personal favorite. These tools will get you a detailed report on what issues you have to resolve to speed up your website.
2. Use a Custom WordPress theme
More than 70% of WordPress websites are using pre-built templates from market places. Testing it with Google PageSpeed insights you will shock you! Mobile page speed score will be less than 50%. That's because of tons of modules that come as features which you will never use. Unless you use a good WordPress theme you will be landing in no-mans land. It will be a nightmare to optimize your WordPress website. So choose your WordPress theme wisely! I prefer a custom built theme. You will have complete control over the theme and optimize it for performance.
3. Optimize Images
You can compress and serve scaled images. I use compressjpeg.com to compress jpeg and compresspng.com to compress png. You can use modern day image formats like WebP, JPEG XR or JPEG 2000. You have to be aware of the fact browsers like Mozilla and Safari are not supporting WebP.
4. Merge JS & CSS files
Use fewer JS & CSS files. Lesser the request will lead to better performance.
5. Defer blocking CSS & JS
Deferring blocking CSS & JS files will allow the browser to print the page immediately. You can use defer attribute to defer your JS files and pass css path using JS after detecting page load.
6. Use CSS Image Sprites
Using image sprites will reduce the number of requests your web page has. Combine social media icons and other icons into one image. This will show a drastic improvement in performance. We accomplished this in Dezvolta’s official website. We combined 30+ images into one image sprite reducing 29 extra requests.
7. Use Lazy-load
If your website has lots of images? Lazy load your images so your images will render only when the user scrolls to that section. You can see a jump in performance as soon as you use this technique. Refer to this article on Google which explains how to lazy load images & video.
8. Enable Gzip & Leverage browser caching
Copy & paste the following lines in your .htaccess file. This will enable Gzip & leverage browser caching.
# Compress HTML, CSS, JavaScript, Text, XML and fontsrnAddOutputFilterByType DEFLATE application/javascriptrnAddOutputFilterByType DEFLATE application/rss+xmlrnAddOutputFilterByType DEFLATE application/vnd.ms-fontobjectrnAddOutputFilterByType DEFLATE application/x-fontrnAddOutputFilterByType DEFLATE application/x-font-otfrnAddOutputFilterByType DEFLATE application/x-font-truetypernAddOutputFilterByType DEFLATE application/x-font-opentypernAddOutputFilterByType DEFLATE application/x-font-ttfrnAddOutputFilterByType DEFLATE font/opentypernAddOutputFilterByType DEFLATE font/otfrnAddOutputFilterByType DEFLATE font/ttfrnAddOutputFilterByType DEFLATE application/x-javascriptrnAddOutputFilterByType DEFLATE application/xhtml+xmlrnAddOutputFilterByType DEFLATE application/xmlrnAddOutputFilterByType DEFLATE image/svg+xmlrnAddOutputFilterByType DEFLATE image/x-iconrnAddOutputFilterByType DEFLATE text/cssrnAddOutputFilterByType DEFLATE text/plainrnAddOutputFilterByType DEFLATE text/xmlrnAddOutputFilterByType DEFLATE text/htmlrnAddOutputFilterByType DEFLATE text/javascript
# Remove browser bugs (only needed for really old browsers)rnBrowserMatch ^Mozilla/4 gzip-only-text/htmlrnBrowserMatch ^Mozilla/4\.0[678] no-gziprnBrowserMatch \bMSIE !no-gzip !gzip-only-text/htmlrnHeader append Vary User-Agent
rnExpiresActive On
# ImagesrnExpiresByType image/jpeg "access plus 1 year"rnExpiresByType image/png "access plus 1 year"rnExpiresByType image/webp "access plus 1 year"rnExpiresByType image/gif "access plus 1 year"rnExpiresByType image/x-icon "access plus 1 year"rnExpiresByType image/svg+xml "access plus 1 year"
# CSS, JavaScriptrnExpiresByType text/css "access plus 1 month"rnExpiresByType text/javascript "access plus 1 month"rnExpiresByType application/javascript "access plus 1 month"
# VideornExpiresByType video/mp4 "access plus 1 year"rnExpiresByType video/mpeg "access plus 1 year"
# OthersrnExpiresByType application/pdf "access plus 1 month"rnExpiresByType application/x-shockwave-flash "access plus 1 month"
9. Replace Slider Revolution with Owl Carousel
Slider Revolution will slow down your WordPress website. You can consider simple alternatives like owl carousel or any custom sliders.
10. Replace Yoast SEO with All In One SEO
Yoast SEO is the most popular SEO plugin. If you replace it with All in One SEO you can see 10% jump in Google PageSpeed Score.
11. Use PHP 7
PHP 7 is twice as fast as PHP 5. It has better memory consumption than PHP 5. Your WordPress will run lot faster in PHP 7.
12. Use a CDN
You can avoid latency issues by investing on the right CDN. Our visitors are from Europe, US & India so our CDN locations are North America, Europe & Tokyo. If you are looking for cost effective & easy to use option i recommend BunnyCDN.
13. Remove any unused Plugins
Uninstall unused plugins. If you follow the above steps you don’t even need a caching plugin. We don’t use a caching plugin for our website.
14. Choose a Good Hosting Company
I recommend highly secure & high-performance WordPress hosting from SiteGround. If you are looking for high-performance cloud hosting you can prefer:rnAmazon AWS Google CloudrnLinode(Linode offers managed cloud hosting services)
rnConclusion:rnIf you are a developer you can use these tips to optimize your website. If not, you may hire the
best website development company or a WordPress expert who can fix it for you. Looking for tips to choose the right web design company?