Even if you are a Trabbi lover – hand on heart, a Porsche drives much faster, doesn’t it?
Nobody likes it slow, whether it’s cars or websites. And that’s exactly why the loading speed of your website is very important. Probably even more important than you think.
Not only does it have a big influence on whether readers stay on your website or leave again, but since 2015 it has also been a factor in your Google ranking.
Even though users on stationary devices (PC, Mac) may wait a few seconds, a website needs to load as quickly as possible, especially on mobile devices. Slow Internet connections make life hard enough for a mobile surfer, but make it easier with your fast-loading blog. So you need to make WordPress faster 🙂
Let me give you an example to show you how big the influence of the loading time is:
Imagine that a commercial website makes $100,000 profit per day. If the loading time of the page is only one second higher, this means a profit loss of $2.5 million per year due to customers jumping away.
So in this article, I will show you how you can make WordPress faster to reduce the loading time.
To be able to check the results of your speed optimization at the end, you first have to do a test of your current loading speed.
I recommend two free online tools for this. Both give you an evaluation of the loading time and show you which elements reduce the loading time.
Google PageSpeed Insights
The search engine giant itself provides a platform where you can check the PageSpeed of your blog. You will get a value between 0 and 100 which evaluates the loading speed.
The best part is that you get separate data for the mobile version of your blog and the desktop version. This way you can easily distinguish which problems cause a higher loading time on the respective devices.
Pingdom Website Speed Test
The free tool from Pingdom gives you even more data than Google. In addition to a value between 0 and 100, it shows you the loading time in seconds, the amount of queries and a detailed list of the loading time of certain files.
Furthermore, the tool gives you even more useful analyses. For example, you can see what kind of content took how long to load. This way you can immediately see if you can get the most out of resizing images, reducing CSS or optimizing something else.
Use a slim theme
Before you optimize your actual content for better loading speed, take a look at your theme. Often purchased templates are overloaded with many functions. This looks great, because you have a lot of possibilities and ready-made elements, but this is also reflected negatively in your loading time.
When buying a theme, make sure that you choose a slim and simple theme. What exactly you should pay attention to is explained in my article 5 Things you should consider when buying a WordPress theme.
Cleaning up the database
Let’s get started right away so we can make your blog faster with WordPress. Your database is a lot of unnecessary ballast, especially if you write a lot of articles.
This ballast is caused by the automatic revisions. WordPress regularly saves your current status while you are writing an article. Since there is no limit set by default, all revisions are kept and quickly accumulate into a huge pile of unnecessary ballast.
The WP-Optimize plugin
You can even indicate before cleaning up the database that you want to keep the data of the last X weeks.
After you have installed and activated the plugin, click on WP-Optimize in your WordPress menu.
But in any case, make a backup before optimizing the database!
Restrict the number of revisions
Now that you have cleaned up the database, you can limit the number of revisions stored for the future. Of course you can also use the plugin on a regular basis to clean up the database again. You can even set the preferences to do this automatically.
You can also prevent that many revisions are saved in advance.
To do this, add the following code to the end of your wp-config.php file:
define (‘WP_POST_REVISIONS’, 3 );
You can change this number as you like to adjust the number of revisions to be saved to make WordPress faster.
Optimize your pictures
Images usually play a major role in the loading time. They are by nature rather large files and can quickly increase the loading time of a blog by a few seconds if used incorrectly.
If you have checked your blog with the Google PageSpeed Insights tool, you will probably see the tip “Optimize images”. Google will even show you an estimate of the potential savings.
Optimize before uploading
Use an image editing program to reduce the dimensions of the image before uploading. If you use stock photos from sites like Shutterstock, Fotolia, Unsplash or Stocksnap, you will get very large files after downloading these images. Reduce the pixel size of these images to the size you will use on your blog.
If you don’t know how to get free, full-right images, check out my article How to get free, royalty-free images in WordPress.
Otherwise, for example, you upload a 5000 x 2800 pixel image but only use a third of the size. This will display it at the desired size, but the image will be loaded at its full size.
Some image editing programs allow you to choose the quality of the image you want to save as .jpg while saving it. For a beautiful online presentation, you don’t always have to choose the highest level. In most cases, quality of 60-80% is sufficient to display the image sharply online. This will save you a lot of file size again.
Reduction during upload
There are plugins that resize your pictures losslessly and completely automatically when you upload them. All you have to do is install one of these plugins.
My favorite is the plugin WP Smush.it. It is free, is updated regularly and even offers you the possibility to resize already uploaded pictures afterward.
Don’t worry, your pictures will not lose quality. But if you have a lot of pictures, you can save yourself a lot of file size.
Activate reloading of images
Normally all images on a page are loaded as soon as the page is called. It doesn’t matter if you see them from the beginning or if the images only become visible after scrolling.
Of course, it makes more sense to load images only when needed. For this purpose, there is a small but nice plugin called Crazy Lazy. Install it, activate it, done.
You can compress your files using a short code snippet to make them load faster. There are two types of compression: gZip and mod_deflate. These reduce the size of files such as your pictures, as well as the system files of WordPress and the templates. You can activate both via .htaccess.
It sounds complicated, I know. But trust me, it’s super easy 🙂
Connect to your web server using an FTP program and open the .htaccess file with a text editor. (How all this works, you can read here: Install and set up FTP program)
Once you have inserted this code, you can use this online tool to check if the compression works and how much disk space it saves: GZIP and mod_deflate Check
Optimize and reduce code
WordPress, the theme, various plugins – that’s where a bunch of programming code comes together. The longer it is, the longer it takes the browser to “read” it. With the help of mod_deflate and GZIP the files have already been compressed, but now we reduce the code.
Autoptimize reduces the files to the absolute minimum. This means, for example, that all spaces are removed to save space. At the same time, the plugin also merges several files, which means there are far fewer queries to perform.
Last but not least we come to the caching plugins. Caching means that instead of creating them dynamically, static versions of all pages are created. This makes the loading speed a huge leap forward. You absolutely need a caching plugin to make WordPress faster!
There are several useful plugins for this purpose, of which I present you my two favorites:
Cachify is a small plugin with very clean source code. I like the fact that you don’t have to work through pages of settings windows. Just a few settings and the caching starts. Try out the different caching methods and test with the speed tests which method works best for your blog.
The plugin is very easy to configure and works great. However, it won’t come close to the next plugin I’ll introduce you to in terms of performance optimization.
W3 Total Cache
With this plugin you get the full package! You will never have seen more options in any other plugin. But thanks to these many possibilities you can make your WordPress Blog much faster. Take care with the configuration, it can also go wrong…
To prevent you from destroying your blog with this plugin (sounds harder than it is, the plugin can always be deleted), you can configure W3 Total Cache correctly by following the instructions here at Pressengers W3 Total Cache. Then nothing should go wrong.