Tips for Optimizing a WordPress Website


How to optimize WordPress? A great question for the millions of people who create web pages through this great content manager … the most important of all existing in the market.

Worldwide WordPress is the most used content manager, covering 33.6% of all websites , and in the specific case of those based on content managers ( Content Management System or CMS) covers, nothing more and nothing less , that 60.5% of market share; WordPress  is very far from the second on the list, which is Joomla , with 2.9% market share on all websites, and 5.2% market share among all content managers.

The great preference for English web creators is WordPress .

In the case of Spain, the data is more overwhelming … WordPress occupies 65% of all the existing websites on the Spanish Internet … a very important fact to take into account; The great preference for Spanish web creators is WordPress .

Content managers opened the door to the creation of multipurpose web pages based on content quickly and easily, also opening the door to the possibility of creating complex pages without needing to be a computer … it is no longer necessary to know programming and bases of data to create a page, nor is it necessary to create them from scratch.

A web based on a CMS will be much heavier and slower …

But using a content manager, such as WordPress , involves placing a very heavy layer in between, a complete framework to develop a website that will use a part of the entire structure. A web based on a CMS will be much heavier and slower … and that does not escape even WordPress itself . That is why it is very important to optimize the websites created under the auspices of the content managers.

In this article I will define a series of improvements that will optimize any website based on WordPress , making it faster and less burdensome in each case. The advice, based entirely on my own experience, is what really worked for me in the way of optimizing the WordPress website , but this text is not a manual on how to make those improvements … looking on the Internet you will be able to execute the changes without major complications

Light themes and few plugins

Before detailing the rest of the tips, the first – and essential – refers to the chosen topics and the imported plugins . Regarding the topics comment that there are created specifically for a type of web page, for example the theme created specifically for a blog – and, then, there are multipurpose topics with different templates depending on the type of website. Multipurpose themes are heavier and tend to load more plugins .

In a WordPress- based website it is very important to activate only those plugins that are really necessary.

Regarding plugins , many times too many are installed, some useful, others that had it and no longer have it, and some to test or functions that are no longer needed. In a website based on WordPress it is very important to activate only those plugins that are really necessary … the less you have, the faster the page will be.

Disable specific use plugins

On websites they are installed WordPress plugins that are momentary execution, such as a plugin for a copy of security of the web. This type of plugins should be activated at the moment that their execution was necessary, and once they are finished, they will be deactivated again.

GZIP compression

Activating GZIP compression is essential for any website, but more fundamental is for a WordPress- based page . Basically it is to send from the web server the compressed site in GZIP, being decompressed locally by the web browser itself , making a website consume less bandwidth , and being also more agile in its load.

There are two methods to activate GZIP compression … the easy and the difficult way. The easy way is to install a plugin that activates that function … there are many available. The difficult way, but the cleanest and most agile, is to modify the htaccess file to activate the compression, it is the ideal way, mainly because of the comments above … how many more plugins , more weight and slowness.

Install Cache plugin

Activating a cache management system, for example the famous W3 Total Cache , allows having the entire web cached, being updated every certain time, achieving a very important increase in the agility of the web. Cache management may be the optimization method with which more agility is achieved for a WordPress- based web , but this change must be made with caution … because it can interfere with some parts of the system.

In my websites I do not use any type of cache, since I have checked many times that it interferes in the obtaining of statistics … it stops accounting for many visits to the website, as well as the number of visualizations of the different entries is adulterated. There are also other types of problems that can generate SEO errors , something that should always be avoided.

I recommend not to execute this point because of the “side effects” that the frisking could produce.

Installing the cache plugin is the first thing everyone usually does, in my personal case it would be the last thing I would do … or maybe I recommend not to execute this point because of the “side effects” that the caching might cause.

Minification and unification

Minification and unification can be an alternative to caching, in fact many caching pluginsalso incorporate this feature. The minification and unification tries to unify certain files and unite them, seeking to reduce calls to the server. It is mainly used for style files (CSS) and JavaScript functions (JS). Perhaps the most famous plugin that focuses on this is Autoptimize .

This section should also be taken with caution, in my experience on the subject I have had very specific problems with this minification and unification, since whenever I have used them – through different plugins – I have always had incompatibilities and problems with others important plugins of my websites.

Control plugins of multifunction packages

There are plugins that offer a lot of functions in a single installation; the most famous could be Jetpack. These types of plugins are extensive and heavy, and include a lot of functions that can not be disabled. Many people use Jetpack, but only use some of their functions, and having all of them activated generates unnecessary running processes. In the case of Jetpack, there is an occasional  external plugin that allows all the unused or unwanted functions to be deactivated, greatly reducing the impact of the module in question.

Install SSL certificate

Through the HTTP / 2 protocol (HTTP 2.0) web pages load much faster than through the classic HTTP / 1.1 (HTTP 1.0), but web browsers only support the new protocol if the connection to the web is made through SSL. Therefore we recommend installing from hostinga certificate style Let’s Encrypt, for example. Then the web will be loaded from HTTPS instead of HTTP, and you can use the HTTP / 2 protocol.

Disable revisions

WordPress stores a revision control by default, which allows you to return to any change made in any WordPress entry or page . Having the revisions activated means occupying more space and making the system heavier. You can disable the revisions by changing the WordPresssettings .

Database optimizers

There are plugins that optimize the database at a given time, that is, eliminate everything that is no longer necessary from the database. If the revisions are not deactivated, the optimization of the database eliminates, for example, those revisions that, in many cases, are already obsolete. This type of plugin  is the one that we should always have installed but disabled, going to activate it when you want to do an optimization.

Activate Lazyload

There is a feature called  Lazyload , which is the loading of the images of a web as it is scrolledon the page, until it does not show an area where there is an image, that image is not loaded. There are plugins for this type of functionality.

Optimize images

There are plugins that allow you to optimize already uploaded images, and new ones to upload. In many cases, images with too much resolution are added to the WordPress website , in many cases unnecessary, and the optimizing plugins not only track the uploads to optimize them, but also control the new uploads so that they are optimized at the moment of a insertion in the web.

Expand the Heartbeat API period

In WordPress there is the Heartbeat API, which is a system that makes calls every 15 seconds or 2 minutes, depends on the status of WordPress at any time, to perform checks or perform certain tasks. That functionality is the culprit, for example, of the self-preservation of entries or pages in writing.

It is convenient to increase the time between the different calls to the Heartbeat API.

About this section it is convenient to increase the time between the different calls, and for that there are different plugins that allow doing just that, increasing the time between calls, which will cause fewer calls and an increase in the performance of the web.

Disable REST API

One of the great features introduced in recent years in WordPress was the REST API, a library that allows integrating  WordPress in external applications. But most WordPress users do not use it; if the REST API is not used, it is convenient to deactivate it. It can be disabled by plugins or manually.

Externally run the cron of WordPress

The WordPress content manager has its own cron , a task scheduler to execute that is in the file wp-cron.php . In this case I do not recommend disabling the cron service, but rather it is managed externally, since the management from WordPress itself consumes too many resources.

It is convenient to disable the executions of the file wp-cron.php in WordPress .

How it is externally managed by the cron of WordPress ? The majority of hosting to host web pages allow to use the task scheduler of the server, so it is convenient to disable in WordPress the executions of the file  wp-cron.php , and go to configure these calls in the own cron of the web server where it is hosted the web page.

Optimize the file Robots.txt

Our web pages are constantly visited by bots , computer programs that track each website to index content – for example, web browsers such as Google use bots . In many cases it is necessary to visit the bots on our pages, but in other cases these visits are not appropriate, even malicious, and consume excessive resources. Optimizing the robots.txt file allows us to indicate specifically which bots we want to visit, limiting the consumption of resources on our website.

Clean the wp_head headers

The WordPress content manager introduces a lot of information in the headers of the page that, in many cases, is totally unnecessary and raises the requests of the page. It is convenient to execute what is known as cleaning the headers , only on a list of specific tags that are recognized as unnecessary. To do that, we have to add a header cleaning function in the Phpcode and add an action to be executed in the web load.

This is the summary of actions that, based on my experience, make a web based on  WordPress improve a lot in size and performance; include all of these measures, except for the cache and minimization-unification that in my opinion generate more problems to solve, will result in a very important increase in an agility already limited by the use of a CMS in its lower layer.

Leave A Reply

Your email address will not be published.