Posts Tagged ‘wordpress’

How to increase speed of a WordPress site

Step 1: HTTPS

After visiting the website https://www.httpvshttps.com/ and many other testing websites it is clear the speed difference between a website with and without encrypted HTTPS is vast. As page load speed is so pivotal to high ranking results a switch over to HTTPS and securing the website with an SSL certificate should be priority one. Not only does this help with page load speed and ranking positions, I personally believe that people are looking for the green padlock in the web browser It’s a small, subtle sign of trust which in the year GDPR become a priority this symbol of trust can go a long way. This is especially important if you’re collecting any private data on your website like credit card information. If the site doesn’t automatically redirect, there’s the plugin called Force HTTPS to get the job done. Or you can simply add the following to your .htaccess file:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com
RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]

Step 2: Browser caching

WordPress plugins are obviously quite useful, but some of the best fall under the caching category, as they drastically improve page loads time, and best of all, all of them on WordPress.org are free and easy to use. By far my favourite, is W3 Total Cache, I wouldn’t recommend or use any other caching plugin, it has all of the features you need and is extremely easy to install and use. You can set time limits for caching of most resources, ranging from scripts and style sheets to most types of images. You would do this if you need resources refreshed in a shorter period of time. An example of this might be if images change periodically but retain the same filename. Simply install and activate, and what your page load faster as elements are cached.

Step 3: Images

“The average website is now 2.1 MB in size, compared to 1.5 MB two years ago.” While you might be thinking that’s due to the usage of themes, plugins, and load-intensive scripts, images are actually the biggest culprit when it comes to sucking up bandwidth and space from a server. But using images in WordPress comes with a price. According to data presented by The Fiscal Times images, on average, comprise 1312 of the total 2087 KB on websites. My favourite image optimisation plugin is EWWW Image Optimizer which offers a variety of options including changing JPG/PNG/GIF compression levels, image resizing, image converting, stripping metadata, WebP support and more.

Step 4: Minify JS and CSS files

If you run your website through Google PageSpeed Insights tool, you will probably be notified about minimizing the size of your CSS and JS files. What this means is that by reducing the number of CSS and JS calls and the size of those files, you can improve the site-loading speed. Also, if you know your way around WordPress themes, you can study the guides provided by Google and do some manual fixing. If not, then there are plugins that will help you achieve this goal; the most popular being the Autoptimize that can help in optimizing CSS, JS and even HTML of your WordPress website.

Step 5: Web Hosting

The major factor that influences the speed of a website is the hosting of your WordPress website. It might seem like a good idea to host your new website on a shared hosting provider that offers “unlimited” bandwidth, space, emails, domains and more. However, the point that we usually miss out on regarding this offer is that shared hosting environments fail to deliver good loading times on peak traffic hours, and most fail to provide 99 percent uptime in any given month. As a first step, avoid shared hosting if you can. Doing so eliminates the risk of having bad neighbours on your server that can slow down your site using a large amount of resources and failing to deliver on peak traffic hours can be costly. Also, unless you have a huge site and the manpower/budget to run your own server, a dedicated server might be more than you need. For that reason, a VPS is probably the best option. This type of hosting provides a nice balance of speed, comfort and cost. Another option is to go with one of the growing offers of managed WordPress hosting. Doing so means your site will run on a server specially optimized for WordPress and you don’t have to take care of any of the technical stuff of running a website. Plus, prices for managed WordPress hosting are dropping.

Step 6: Delete Unnecessary Plugins

There are over 54,382 WordPress Plugins. The ease at which you can install WordPress Plugins is both a beauty and a curse. Often leading to plugin bloat. Each plugin adds more and more code for WordPress to load. Adding more weight and decreasing performance. As a first step, deactivate or delete any unnecessary plugins and check if the site loads faster. Alternatively, you can use a plugin profiler  to narrow down plugins that are slowing down your WordPress site.

Step 7: Decrease Server Requests

A server request happens every time your browser asks some type of resource from your server. This can be a file like a style sheet, a script or an image. The more server requests necessary to complete loading your site, the longer it will take. As a consequence, requests should be as few as possible. Every HTML, CSS and JavaScript file your site requires adds to the number of HTTP requests it takes to load your site. So by combining and minifying these assets, you not only reduce the number of files that need to load, but you reduce the total file size of your site. Combining files, meanwhile, is just like it sounds. For example, if your web page load 5 external CSS files and 5 external JavaScript files, combining your CSS and JavaScript into a single separate file each would result in just 2 requests instead of 10. However, it’s important to note that if you’re using HTTP/2, it means that several requests can happen at the same time and combining files will have less of an impact on the loading time. Pingdom and GTmetrix can show you a detailed list of server requests and how long they need to complete. From there, you can take steps to either eliminate requests or make sure they complete as quickly as possible. That brings us to the next point.