Maintenance of WordPress

Last revision: 3 of May of 2020

Table of contents

WordPress is a system that is based much on the retro compatibility with previous versions, and that in addition works much for the good maintenance of the nucleus. By defect updates of the smaller versions are realised, so that it is possible to be maintained updated automatically during long time with security improvements that are appearing.

Even so, he is more than recommendable to maintain all the system so that they are applied updates of security and functionality.

Updates of the nucleus

By general norm WordPress has some minimum systems of update that can be updated from the configuration file wp-config.php. We have three defaults:

Smaller updates of WordPress: this option would realise the automatic update of version 5.4.1 to the 5.4.2.

it defines (€˜WP_AUTO_UPDATE_CORE€™, €˜minor€™);

Updates majors of WordPress: this option would realise the automatic update of version 5.4.1 to the 5.5.0.

it defines (€˜WP_AUTO_UPDATE_CORE€™, true);

Without automatic updates: this option would prevent any automatic update of the nucleus of WordPress.

it defines (€˜AUTOMATIC_UPDATER_DISABLED€™, true);

Update of all the WordPress

An option little recommended but that exists is to force that all the system is updated. For it several exist hooks of WordPress that allow to activate from plugin this. Of the same form that can also be activated it is possible to be activated (changing true by false).

defined (€˜ABSPATH€™) or die (€˜Bye bye! €™); to add_filter (€˜auto_update_core€™, €˜__return_true€™); to add_filter (€˜auto_update_plugin€™, €˜__return_true€™); to add_filter (€˜auto_update_theme€™, €˜__return_true€™); to add_filter (€˜auto_update_translation€™, €˜__return_true€™); to add_filter (€˜auto_core_update_send_email€™, €˜__return_true€™);

This system is not recommended.

Plugins & Themes Car

From WordPress 5,5 a native system within WordPress is gotten up that allows to choose what plugins and themes we want that they are updated automatically to facilitate the work and not to have to make it manual from the panel of administration. Previous to integration in the nucleus plugin WordPress Car exists.

Maintenance with WP-CLI

Another interesting option for the maintenance and revision of the state of WordPress is the WP-CLI use. This system us permie, among other things, to control practically all WordPress from the line of commando and the maintenance and update of its components.

Installation of WP-CLI

The installation is quite simple.

curl - Or https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar php to wp-cli.phar --info chmod +x to wp-cli.phar mv to wp-cli.phar /usr/local/bin/wp wp --info

This we unloaded software, we verified that it is and we formed it in a folder so that is available from all the system.

From we can here make some things.

NOTE: the commandos next are an example than it is possible to be done, but you have documentation of all the commandos if you want to make more specific things.

Verification and maintenance of WP-CLI

We can review that it is installed and update it to his last version.

wp cli version wp cli check-update wp cli update

Once we have verified that it is installed, we can visit the folder where we have the file wp-config of our WordPress.

CD /carpeta/de/instalacion/wordpress/

Verification of WordPress

We verify that there is not anything €œrare€ installed in the nucleus.

wp Core verify-checksums

Also we can review the configuration of wp-config.

wp config get

And for example to list the users whom there are in the system.

wp to user list

Revision of the nucleus

We review the version of WordPress.

wp Core version

We verify if there is a new version of WordPress.

wp Core check-update

If it is necessary, we can update to the last version of WordPress.

wp Core update

Revision of plugins

First that we can do it is a revision of plugins installed.

wp plugin list

Next, we listed all the plugins that have updates.

wp plugin update --dry-run --all

And we can make an update of all the plugins.

wp plugin update --all

Revision of themes

First that we can do it is a revision of themes installed.

wp theme list

Next, we listed all the themes that have updates.

wp theme update --dry-run --all

And we can make an update of all the themes.

wp theme update --all

Revision of translations

We make a list of all the installed languages.

wp language Core list

We list all the languages that have pending translations.

wp language Core update --dry-run

And if everything squares to us, we come to the update.

wp language Core update

Other interesting commandos

Other tools exist that can help the maintenance of our WordPress. Some of these appear next.

To eliminate all the transients expired

wp transient delete --expired

To verify the area code of the tables of WordPress

wp db prefix

To verify the size of the data base of WordPress

wp db size

To optimize the data base of WordPress

wp db optimize

To verify the size of the data base of WordPress

wp db size

External tools

In the case of having to manage many WordPress, you can make use of some external systems. Some of these systems are:

  • MainWP WordPress Manager (free and of payment): He is plugin for WordPress. It has the option of Servant and Client, everything working on WordPress and under your control. If it worries to the privacy and the control to you about the data, it is very good option since you have the control of the same.
  • InfiniteWP (free and of payment): It is a complementary software to WordPress. Like MainWP, has a tool Servant and Client, everything working under your control.
  • ManageWP (free and of payment): It is an external service to your WordPress. In this case, the data of your sites and the control har¡nd esde an external platform where the information is sent.