Contact Us:
07002007332
CheapDeveloper
CheapDeveloper » Webmaster » Articles » A few simple steps to speed up a WordPress site

A few simple steps to speed up a WordPress site

13 December 2021, Monday By Priyanka Boruah
103
0

It's no secret that fast loading of the site allows you to keep visitors on the site. Agree that no one will view a site where you have to expect page loading, the visitor is most likely to leave by clicking on a couple of links. Imagine yourself in his place.

This is confirmed by the results of Google research - visitors prefer fast sites.

On this page

Choose the right hosting

Enable compression

Caching

Combine CSS and JS

Optimize images

External scripts

Clean and optimize database

Analyze it

Backup

Tip of the iceberg

speed up a WordPress site

Related: 20 Best WordPress Chat Plugins For Your Website

Choose the right hosting

If hosting does not provide normal speed, then no matter how you optimize your site, there will be no result. A fairly common question on the web is how many visits will hosting withstand? Visits to visits are different. If there are just statistical pages on the site, then even a large number of visitors will not create a big load, and if the site, let's say, has a forum installed?

A visitor is logged into the site - the database is being accessed. A user enters the forum - unread messages and topics are selected. Private messages are loaded, and these are all calls to the database. And if the base is also large? Therefore, one often hears that a friend has three thousand visits a day, and everything "flies", but I have only five hundred, and everything barely turns over. Moreover, the friend and the author of the question have completely different sites.

In addition, some plugins create a heavy load, the developers of the BuddyPress social network plugin recommend switching to a dedicated server when installing it.

Or you can hear - there is a catalog, everything worked fine for a year, but now there are only 503 errors. Well, over the course of a year, the base has grown tenfold, and the number of people using search on the site has grown by an order of magnitude. Search can also load the database heavily, especially search with filters.

Here you need to look at "hits", hits are requests sent by the visitor's browser to the server. Every time a visitor's browser requests to view a page on your site, that request is sent through your server and is called a hit. You can read more about hits on Wikipedia.

Related: What is hosting and why is it needed

Enable compression

Gzip for websites was first used back in 1992 and has not lost its relevance until now, if your resource is not overloaded with images, then page compression can go up to 75%, which, of course, speeds up page loading.

Gzip works simply, the volume of traffic is compressed, which means that it is transmitted faster. Even if you have a gigabit Internet connection, this does not mean that there are no nodes between you and the site that limit the data transfer rate.

Caching

Statistical sites are loaded faster than dynamic ones, and this is because static pages are stored on the server and are immediately presented to the visitor, and a dynamic page is formed by the site after accessing the database, which takes time. Accordingly, the more visitors, the more hits. When caching is enabled, when a page is accessed, a copy of it is saved to a file and issued the next time it is accessed, which not only reduces the loading time, but also reduces the load on the server.

Combine CSS and JS

Mobile visits are on the rise, and large stylesheets and jаvascript are particularly slow to load on those devices.

If you are not an advanced developer, then you can combine CSS files with jаvascript using a plugin such as Better WordPress Minify, its installation and configuration is very simple and is well described on the developer's site.

Also, the plugin "combines" several CSS files into one, which is incredibly pleasing to the browser on the visitor's side.

Optimize images

Everyone, probably, has met sites where there are more than one dozen images per page. Such pages take a long time to load, moreover, sometimes "hanging" the browser, consuming most of the memory. During peak loads, the browser can use up to two gigabytes of memory. And if a visitor has several "heavy" applications running on his computer in parallel?

Such pages must either be split into several, or, if absolutely necessary, make them galleries with light previews.

PNG image format is widely used now. Pros - high image quality and transparent background, which allows you to dynamically overlay it on other images. Cons - large size. The image can be reduced, as a rule, several times, using either a special plug-in for photoshop, or the online service. See: How to Optimize Images for the Web for more information.

External scripts

Sometimes adding external scripts, such as advertising or "decorations", can have an unexpected effect.

Somehow our forum started to slow down, more and more often giving error 502, and it was even transferred by the hoster to another server for slow resources. As it turned out, shortly before that, a script from the AdSense advertising network was installed on the forum, and the AdSense crawler was the culprit, which practically did not leave the forum, constantly indexing new messages.

Clean and optimize database

Perhaps not everyone knows that WordPress saves your changes as a correction every time you edit the material, as a result, the size of the database begins to grow, which again affects the loading speed. Here we can recommend the wp-optimize plugin, which not only cleans, but optimizes the database.

Related: How to Promote a WordPress Blog: 14 Effective Tips

Analyze it

The question often arises, how to estimate the website loading speed? A subjective assessment or an assessment "by eye" is perhaps the most unreliable assistant.

Now there are many resources on the Internet that allow you to test the loading speed of a site, but two are especially worth highlighting.

The first is https://pagespeed.web.dev/. Moreover, it analyzes your site for both mobile devices and desktops and gives recommendations for improving performance.

The second one is https://tools.pingdom.com/, in the test results you can see which scripts and at what speed are loaded on your resource.

It is useful to note that you should not include all the improvements at once, and then look at the result. It is better to turn them on one at a time and watch, in some cases the result may turn out to be exactly the opposite.

Backup

Backing up is usually remembered “when it's too late to drink Borjomi”. Akeeba Backup for WordPress allows you to make a backup copy of a website or restore a website from a backup copy in two clicks. You can also download the archive and deploy it on a PC "for experiments." Experiments are much safer to run on a local server.

Tip of the iceberg

Of course, the material describes the most obvious and simple optimization solutions. By and large, you need to optimize the site at the initial stage of development. First, a task is set, and a CMS is selected for it, but, unfortunately, you can see an absolutely opposite approach - I know this CMS and therefore I will create a website only on it.

Related: Internal link: Guide to internal linking of the site

Discuss
Add a comment
Comments (0)
Comment
Partners