New users of the WordPress CMS hardly care about how slow their sites are but when you use the CMS for several months and learn about SEO, you’ll keep checking the loading time of your site often.
Website speed is one of the 100s of search engine ranking factors. Slow sites hurt the user experience. Poor user experience = high bounce rate and exit rate. If the exit/bounce rate is high, the rankings of the pages will be not good in the search engine result pages.
Here are the effective tips you can follow to speed up WordPress sites:
How to speed up WordPress site?
Use the latest version of WordPress
If you’ll see the changelog files of the WordPress content management system, you’ll find that most of the updates are rolled out to fix an issue in the previous version of the CMS. A bug may be responsible for the slower execution of the script. You should always use the latest version of WordPress to avoid performance issues that may be caused by bugs in the WordPress core files.
Use a caching plugin
Caching plugin, if configured properly can reduce the CPU usage that is caused when the PHP interpreter converts the PHP code to HTML or executes the SQL query and processes the result. What does a caching plugin do? The plugin saves a copy of the page on the server. When the browser requests it, the plugin will send the file to the webserver and the webserver will transfer this file to the browser. If you don’t use the caching plugin, the PHP interpreter will interpret the PHP code. The code may fetch data from a database, calculate the value of something, etc.
The most popular caching plugins in the WordPress repository are W3 Total Cache, WP Super Cache, etc. WPSC is a simple but effective caching plugin with very few options. W3TC has several options and it can be tricky to configure. If you can spend some money, you should have a look at WP Rocket. WP Rocket is the best premium WP caching plugin. It is an all-in-one plugin that can generate critical CSS for your website, minify the website’s CSS/JS files, etc. The plugin is easy to set up and easy to use.
Enable Server side caching
If you configure the webserver to cache the pages of your WordPress site, you won’t have to use a caching plugin. For example, Nginx – the popular webserver ships with the FastCGI cache module that can store every page accessed by humans and bots on the server’s storage or system memory. You can configure the FastCGI cache to remove the cached files after a few minutes, hours, or days.
Use hosting that supports Nginx
Nginx is a great alternative to the Apache webserver. I’ve used both the webservers. In my perspective, Nginx consumes lower system resources and is significantly faster than Apache. Nginx has a built-in caching solution that can make a website load faster. The caching solution is called “Nginx FastCGI cache”. Servers of Siteground, WPX Hosting are powered by Nginx. If you want to use unmanaged hosting, install the LEMP stack instead of LAMP.
Use a good hosting company
Shared hosting is the cheapest form of web hosting. There are several hosting firms that offer hosting service at a dirt cheap price tag. You should avoid buying a hosting plan from such companies. Managed WordPress hosting firms have expensive plans but they offer great support and a top-notch server stack, good hardware, etc.
Use the latest version of PHP
PHP 7.x is significantly faster than PHP 5.x. When PHP 7 was launched, many expert WordPress users ditched Facebook’s HHVM. The good news is that most shared hosting firms support PHP 7.x. They provide an option to change the PHP version.
Minify CSS/JS files, activate GZIP compression
Plugins such as Autoptimize can minify the HTML code, CSS, and JS files. It can also combine several files into one. Premium WP themes ship with the minified version of the original CSS/JS files as well as the original files. If you can afford a premium theme, you should use it. GZIP compressed files are smaller than the minified files. It is easy to enable GZIP compression on web servers. Activate the GZIP compression for CSS/JS files if you’ve not enabled it. Always remember that GZIP compression + Minification = Good Performance.
Use a good theme
You should wisely choose a WordPress theme. If your blog doesn’t require fancy elements such as accordions, tabbed widgets, etc, you should use a simple WP theme. This is the opposite when it comes to feature-rich WordPress templates. I’ve shared in-depth reviews of the best simple/advanced WordPress themes here in case you’re looking for good themes. If you want to use the elements mentioned in the previous paragraph, you must choose a good hosting company.
Lazy Loading
The latest version of WP enables the lazy loading of images throughout the site. If for some reason, you’re not using the latest WP, you should install a plugin that will add the lazy loading feature to your website. How lazy loading helps to speed up a WordPress site? Instead of transferring all pictures and loading them, the website will load pictures only when they’re required.
Final thoughts
Google Page Speed Insight tool rates the page of a website on the basis of its TTFB (time to first byte), FID (first input delay), FCP (first contentful paint) speed, and a few other factors. The above tips/suggestions will help you in improving these three and various other metrics that website speed testing tools take into consideration for rating a page. Additionally, installing security plugins such as WP Force SSL to enable SSL on your site and WP Login LockDown to protect against brute force attacks can enhance the overall performance and security of your WordPress website, indirectly impacting speed metrics as secure websites often tend to perform better.