13 tips to improve your WordPress website speed

13 tips to improve your WordPress website speedWhen you create and maintain a website, one of the most important areas is called user experience. If your visitors have a bad time while on your site, you can be sure that they will not convert to customers. And website speed is one of the most important factors about user experience.

In case your website takes ages to load, visitors will not stick around. As of 2017, “ages to load” translates into “more than a few seconds.”

Another strong incentive to turn your attention to improving your website speed is the fact that Google considers loading speed as one of their ranking factors. And while they have more than other 200 ranking factors, don’t underestimate the fact that they monitor user experience as well.

So if your website is slow, you will rank lower not only because it’s slow, but also because visitors will leave it faster.

You can quickly measure your website speed using one of the popular free tools: Pingdom, GTmetrics, WebPageTest or Page Speed Tools. Aside from simply telling you how fast your site is, they will also help you identify any problems that you might have and offer solutions.

Today, we will show you 13 tips on how to improve your WordPress website speed.

Get a good hosting provider

Choosing the right hosting provider can play a great role in the life of a WordPress site. The first thing you need to do is identify the type of hosting you should choose – shared hosting, virtual private server, dedicated server, etc. This will depend on the type of your site, your resource usage, and your projected growth.

As a general rule, personal blogs or small business websites will run fine on a shared hosting plan. An online store could run fine on shared hosting. However, a fairly popular or a large store will need a VPS.

A dedicated server should be used for news portals or any websites that have a lot of media files, which have to be hosted in-house.

A good hosting provider, however, is not just someone that offers a lot of hardware resources. The network connectivity of the data center also plays a role.

Most hosting providers will usually have a way to test the speed of your connection to their servers via a public IP. You can test how fast the IP will resolve from different locations using maplatency.com.

Another thing to consider – how many optimization options the provider can offer. Do they allow the use of Varnish, Memcached, or Redis, etc?

Also, always look for a provider that offers at least a 30-day money back guarantee or a 30-day free trial. This way, even if end up not liking them, you can get your money within 30 days and look for another hosting provider.

Use server-side caching

By nature, WordPress sites are dynamic. This means that the pages are generated per user request. They don’t exist in their HTML form before you visit them.

With server-side caching, the HTML version of the pages is stored in the server memory for further requests. And the server will serve a static, pre-generated HTML page much faster than a PHP page, which will have to pull data from a MySQL table. This can significantly improve your website speed.

There are many WordPress plugins that can help you leverage server-side caching. The most popular are W3 Total Cache, WP Rocket and WP Super Cache.

When you set up a caching plugin, don’t forget to consult with your host as to what will be the best configuration depending on your current hosting plan and the available features.

Optimize your database

The database is where all the content for your WordPress site lives – posts, pages, comments, meta information, etc.

As such, a healthy database will directly relate to faster website speed. If your database is slow, no matter how much you optimize your website, it will be slow, too.

A good way to keep your database in check is by using the WP Sweep. Delete any duplicate data, unwanted post edits and more.

If you don’t want to use a plugin, you can use the Optimize table command from the PhpMyAdmin interface. It will automatically optimize the records in each table for faster access.

Use a CDN (Content Delivery Network)

Despite the fact that the Internet is global, websites, hosted on servers physically closer to you, load much faster.

To fix this problem you can use the help of a Content Delivery Network – CDN. A CDN provider will effectively cache all static content on your website. It will then make it available from multiple locations all over the world.

This way if a visitor asks for a page, it will load much faster, as the static content will be served from a location much closer to him.

Popular CDN providers are Cloudflare and MaxCDN. If you are on a budget, Cloudflare offers a fully-featured free plan as well as a free SSL certificate.

Implement client-side browser caching

Usually, browsers will try to automatically cache static files in a temp folder. This way, the next time a visitor opens your page, his browser will load resources from that temp folder instead of employing your website.

While this happens automatically, you can instruct the browser for how long to keep certain files in the cache.

This is really useful for files that are not changed that often, like CSS files or image and video files.

Optimize your images

Each image you have on your website has to be downloaded by your visitors in order for them to see it. So, larger images will take more time to load and cause your page to appear broken or incomplete.

A few things you need to consider if you wish to improve your website speed are the image file format and the quality of the image. A .png file will retain more quality, but will also come with a larger file size. A .jpg file will generally offer a bit lower quality, but it will come in a much smaller size.

A nice rule of thumb is to save images, that offer multiple colors or multiple objects in them in .png. Images with fewer colors or with just a single object in them can be saved in .jpg.

Another thing you can consider is even further optimizing the file size with a plugin or a third party service.

Plugins such as Tiny PNG, Compressor.io, WP Smush and EWWW Image Optimizer will automatically optimize all images you upload to your website, reducing their file size.

If you don’t want to use a plugin, Photoshop’s “Save for the web” feature will reduce the file size quite a lot. Websites like Tinyjpg.com will also offer a free image compression service.

Combine images into sprites

If your website uses a lot of smaller images, like icons and thumbnails, you can combine them into a single, larger image, called a CSS sprite. This image will contain all icons and you will refer to them by location with CSS.

As a result, the number of HTTP calls your site makes will be reduced, and it will load faster.

You can create sprites manually, with an image editor software such as Photoshop or Gimp.

Aside from that, there are multiple online services that allow you to create a CSS sprite. SpritePad or InstantSprite are the most popular online solutions.

Remove plugins that slow you down

There are tons of plugins available for WordPress, adding all kinds of different functions that are not available in the base version.

However, if at any moment you are using more than 25 different plugins, chances are that some of them are actually doing more harm than good in terms of website speed.

Consider lowering the number of plugins you use for WordPress. Remove those, whose functionalities can be replicated by another service.

Also, P3 Plugin Performance Profiler is quite often recommended. It promises to analyze your plugins and tell you which ones you need to disable.

However, P3 Plugin Performance Profiler hasn’t been updated in over 2 years. It no longer works, so you should avoid it.

Implement Lazy Loading

Lazy load is not something lazy, as a matter of fact, it’s something quite clever. With lazy load, your website will load resources only for the area of the page a visitor is currently looking at.

This will result in a faster initial load, but will also cause the page to load additional elements as the user scrolls down.

Another benefit of lazy loading is that it avoids making all the HTTP requests necessary for the page load at the same time, as additional requests will be made later.

You can implement lazy loading with plugins like BJ Lazy Load and a3 Lazy Load.

Minify your CSS, HTML and JavaScript code

File size in files is increased with a small fraction of each space between characters and with each new line.

And you can shave off these extra bytes by “minify”-ing your HTML, CSS, and JavaScript code.

What “minify”-ing actually does is to remove all new lines and extra characters, that will otherwise make the code more humanly readable. After that, your HTML, CSS, and JavaScript will be smaller in size, harder to read by a human, and a tiny bit faster to be read by a machine.

There are several ways you can minify your code – either by hand or with a third party service. Most caching plugins for WordPress already offer code minification. Stand out third party services are Refresh SF and CSS Minifier.

Implement GZip

GZip is another way to trim the size of your HTML, CSS and JavaScript files. It’s a way of file compression, where identical blocks of code are identified and rewritten to avoid repetition.

This, in effect, reduces the amount of content in these files. And less content = smaller size = improved website speed.

You can enable GZip with pretty much any caching plugin, or with dedicated plugins such as “Check and Enable GZIP compression” or “WordPress Gzip Compression“.

If you want to do it by hand, you need to add a special line to your .htaccess file for each file you want to compress, as well as dedicated meta tags in the header section of the code.

Postpone JavaScript loading

If your website has to load multiple JavaScript scripts, you can move their code from the header to the footer.

Doing this will load the visible part of the page and the user will be able to see the content without having to wait.

This approach does have a drawback though. The full functionality of the page will be loaded after the user starts browsing.

Again, you can do this by hand for all the scripts you want, or you can use the Async Javascript plugin.

Implement AMP (Accelerated Mobile Pages)

We’ve left APM in the last place because it will not necessarily improve the loading speed of your website.

AMP is a protocol for mobile-friendly pages, which places the emphasis on the content, cutting pretty much everything else.

However, once a page is AMP-ified, it will be served by Google’s cache. It will also be labeled with a little icon in SERPs.

This is pretty much the only way a visitor can reach an AMP page. Repeat visitors that go directly to your website might have a different experience.

You can implement AMP for free, either by hand or with the AMP for WP or AMP plugins.

******

Optimizing your website is important and it’s true that it is indeed essential for your users’ experience.

However, you should never sacrifice more important factors like weight, relevance, topicality, reputation and/or value-add.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.