Automatic WordPress updates

Since version 3.7, WordPress has natively implemented background updates and automatically enabled them for minor releases. Filters allow you to more precisely control what is automatically updated. A permanent, fully automated installation of all minor, major, plugin, theme, and translation updates is not supported, but can easily be achieved through other means.


There are numerous plugins that increase the frequency of notifications and some even promise to perform the actual updates; however, none of these plugins reliably succeed. A very suitable solution (not only for this purpose) is the powerful command-line tool WP-CLI . After a brief installation , the following lines (executed in the WordPress project folder) ensure that all updates for the aforementioned components are installed without exception.:

c9350c4b867d1cadd72c3e4a77ae98a0

The following Oneliner (which can be shortened using an alias or with tools like flimsy ) can be run on any SSH server (even without previously installed WP-CLI) in order to install all updates there in one fell swoop:

c9350c4b867d1cadd72c3e4a77ae98a0

The --allow-root flag ensures that systems can run as a root user (this is essential in WSL environments). An update of any component without prior testing in a local development environment is not recommended under any circumstances. However, if you have a shielded WP environment or a special use case that you always want to be supplied with the latest updates, the whole thing can also be automated via a simple cron job in the form of a bash file:

c9350c4b867d1cadd72c3e4a77ae98a0

WP-CLI can do a lot more: add user roles, delete comments, search and replace strings in databases, import media files... it's worth taking a look at the documentation . I have currently opened two GitHub issues that concern small bugs in the language module , but do not prevent use in productive environments.

Back