Improving the performance of a WordPress site is essential. In a world where everyone is in a hurry - me first - no one has time to waste with the loading time of a website. Even if a blog article looks interesting, we become demanding and we want to read it right away, if not never!
Do you recognize yourself there? It's the "mobile effect": I'm at a bus stop, I have two minutes to waste so I document myself... the bus arrives and the page is still loading. Too bad, it will be for another time or never because when I get on the bus, I receive a tweet or another notification and I have already forgotten this great article on this super slow blog...
This is what happens when your website is too slow. In this article, we will look at how to improve the performance of a WordPress site....
This is a question that was asked to me by email by Sophie. In fact, the real question was: "how can DIVI files be made lighter? Because in terms of speed, it's not great. Can we get rid of unnecessary JS files, for example? »
Before answering this question, let's return to some essential points....
What are the advantages of having a high-performance website?
This is a question that may seem a little silly, but many site creators prefer functionality and aesthetics to performance. It is often the last wheel of the carriage (with accessibility and that's a shame). Yet you have so much to gain by improving the performance of your site:
First, search engines such as Google prioritize search results for high-performance and fast websites. To improve the user experience, Google more easily suggests sites that load quickly in its first few pages of results. As well as slow loading websites will not be ranked as highly as others. That is why it is so important to Google created the AMP project.
Second, a high-performance and fast website significantly improves the user experience. This famous picture story I told you at the beginning of the article is not a legend. It's very real: the Internet user doesn't like to wait even a fraction of a second too long and won't hesitate to leave your site and look for another one to meet his needs.
Finally, as a website designer, you must offer high-performance websites because they are a testimony to your skills and know-how. Imagine if you want to promote your portfolio but it only offers examples of slow sites, do you think the prospect will want to entrust you with his project?
Why improve the performance of a WordPress site?
Some say that "WordPress is slow", but before blaming this CMS, it is important to understand how it works and why it can affect the speed of page loading.
To work, a WordPress site needs a MySQL database in which it stores the content of pages, articles and various settings while the files are stored on a server (Divi theme, plugins and images).
Each time a user requests a URL (an article or a page), a database query is made to display the related content.
This is why it is said that WordPress (like other CMS) loads more slowly than a static website and requires a little more attention in terms of performance.
How to test the speed of a web page?
Have you already tested the performance of your site? Did you know that there are free online tools that will give you an estimate of the weight / performance / speed of your site? Here they are:
You don't have to copy and paste the URL of your site (or the neighbour's) to check its performance.
A word of advice: take a screenshot during your first test. Thus, after having carried out the corrective actions aimed at improving the performance of your website, you will be able to redo a test and see your progress.
How to improve the performance of a WordPress site?
In her email, Sophie asked me if it was possible to delete Divi files that would be useless to us and to my knowledge, we can't do this action in a "clean" way.
In fact, in a way, we could do it, but it would have consequences: as soon as you change a theme, the changes that have been made will disappear as soon as we make the next update of the theme.
That's why WordPress allows us to create a child theme, just like I do explains it to you in this article. However, this child theme allows us to add FEATURES but does not allow us to delete FILES. A child theme is therefore used to "overload" and not to "unload".
To improve the performance of a Divi site, you will then have to perform a series of actions and choices:
NB: these improvements can be applied to all WordPress sites, even those not using the Divi theme.
1 - Choose a good host
I think this step is essential. Although some users swear by the "free" and "low-cost", if you care about your site or blog, it is not on this point that you should save money.
A poor hosting solution is one of the first points where performance is lacking. For my part, I only advise my customers 3 hosting providers:
- OVH: even if this host sometimes encounters some temporary failures on some of its servers, it remains a reliable value and I greatly appreciate the quality of the telephone support that always provides a solution to the problem. Be careful, I recommend never to subscribe to the "first price" offer.
- WP SERVER: a top-notch hosting that only handles WordPress sites, has advanced security, ultra-intuitive use and high performance. I particularly appreciate the quality of the very responsive support: the little "live chat" button never kept me waiting more than a minute (discover WP Server).
- O2SWITCH: it is an alternative to the other two hosts.
These three suppliers are French, which is really a "plus" when you have to exchange with them... In general, I advise my customers to run away from the other hosts.
2 - Configure your hosting correctly
Even if these configurations are closely linked to the options offered by the host, make sure you have chosen the latest version of PHP: PHP 7. This is not new but version 7 considerably improves the performance of a website.
3 - Optimize your images for the Web
Photos and images are WordPress' Achilles heel. Users want to display a lot of them, in sliders, in carousels, they want them in high definition etc... and this is the DRAM!
Images are one of the first causes of slowness in loading a site. I therefore advise you to pay particular attention to this.
You will first have to process the images upstream, before uploading them to your site - I tell you everything in this full article dedicated to image optimization for WordPress - but you will also need to act after the download by using a compression plugin like Imagify. This plugin is magical and further reduces the weight of each of your images by half.
4 - Use a cache plugin
I think there is no secret, if you really want to increase the performance of your site with Divi (or any other WordPress theme), you will have to consider installing and configuring a cache plugin.
A cache plugin allows you to create a static copy of the page or article of your site and store it in the user's browser, thus eliminating the step of going to the database to retrieve the requested content.
As a result, this page stored in the user's browser cache will be offered again - during a future visit to your site - in a fraction of a second instead of going back and forth in the database. Exception made if the user clears his navigation history....
Cache plugins are sometimes difficult to configure and can "break" your site. Don't worry, just uncheck some options to get everything back to normal. For my part, I use the extension WP Rocket (premium plugin in French) but it is not there are freemiums.
5 - Use a CDN if necessary
The principle of a CDN (Content Delivery Network) is to provide data to your users from a closer server source. When a user enters a URL to display your site, the data must travel from their location to your server, then return to their location to display the requested page. The physical distance between these two points can have an effect on the page loading time. This way, Internet users close to your server will be able to see your site more quickly.
NB 1: not all sites need a CDN but you should consider this option if you have many resources on your pages such as images, style sheets, videos etc. and if the traffic is high and your hosting does not follow.
NB 2: setting up a CDN will only work if you have already set up a cache plugin.
6 - Beware of plugins
When you discover WordPress, you can get excited at first and install anything and everything as a plugin. It's super addictive and it's free, in most cases. So we tend to add some unintentionally.
Plugins can be a source of slowing down your site. It is not really the number of extensions installed that makes the difference but rather the quality of the code of each plugin, the requests it makes and the files it embed.
If you do a performance test of your site with one of the tools I was talking about at the beginning of the article, you will be able to check which requests are the longest.
Depending on the results, you may/will have to make a decision about some plugins... Do you really need this plugin that makes a great effect on your images but adds lots of files that plague the user experience? Do you really need to display your latest Instagram photos or your Facebook news feed?
7 - Les Embeds: not always friends
Embeds are files embedded in your WordPress pages or articles. There are all kinds of them such as YouTube / Vimeo videos, tweets, Pinterest maps, Google maps.
If you look at the code and loading time of your pages, you can check which resources take the most time and slow down the loading of your site.
In this case too you will have to make choices: do you really need a Google Map on your homepage? Shouldn't you rather insert it in the contact page for example, which is a less visited page than the home page? Or even better, why not replace the Google Map with a Call-to-Action that leads to the online Map link?
8 - The fonts also play!
Did you know that the fonts you choose have an impact on the loading time of your WordPress site?
A font is a collection of glyphs that contain a lot of information, some of which have additional metadata.
Imagine the impact of using several fonts on the same page, especially if these fonts are complex.
Conclusion on the performance of its Divi site
To conclude, I wanted to come back to the theme of Divi and its performance. It is obvious that the choice of theme will have an impact on the loading of your site.
Moreover, many premium themes sold on ThemeForest focus on functionality and design rather than performance: generally, performance does not sell, while the pretty carousel on the homepage does!
There was a time when the Divi theme had some problems of slowness, indeed, but a major update in August 2017 has fixed many problems as explained in this article. This is one of the advantages of choose a theme which is maintained and improved on a regular basis.
So if your site using the Divi theme is very slow, it is recommended to check the 8 points listed above and see if some parameters could be improved. But above all, here are the 4 most important criteria on which you must absolutely make an effort (without concessions):
- the choice of a good host
- the optimization of your images
- caching your site
- the elimination of plugins that lead the loading of the site