sebastian lochbronner
Menu

WP-CLI - the alternative to the WordPress Dashboard

You're probably used to doing WordPress installations, like plugins and updates, through the normal backend. Since a few years [...]
January 29, 2019

You are probably used to do WordPress installations, like plugins and updates, via the normal backend. But since a few years there is now another way to control backend tasks via the command line. With the program WP-CLI you can do many backend tasks. This way of working offers a few advantages and can therefore be a real alternative to the usual way.

What is WP-CLI?

Command line, WP-CLI, that all sounds somehow like programming language and complicated. About the normal backend it is much easier, you might think now. But there are advantages. WP-CLI is a command line interface for WordPress. You can for example update your WordPress installation or install plugins. There is a whole collection of command lines available in WP-CLI.

The project was originally started by Andreas Creten and Cristi Burcă, meanwhile it is an official WordPress project. With the help of sponsors the further development is financially supported.

What are the advantages of WP-CLI?

There is a small learning curve associated with WP-CLI, but once you get the hang of it, many tasks are quicker than using the familiar backend interface. It is then enough one command, instead of various clicks through the navigation and levels of the backend. Even if you have multiple WordPress websites installed on your server, you can execute commands that apply to all installations at the same time. An enormous time saving as you can see.

With cronjobs you can even automate the command lines. This is useful for backups, for example, or if you simply want to do all the updates that are available. But you should always pay attention to a certain order. First backups then updates. With plugin updates there can be problems and to protect the rest of the site, it makes sense to make backups before. You probably got this hint in the graphical backend before you wanted to update something.

Example what you can do with WP-CLI

As already mentioned, you can manage installations and updates with CLI. But there is much more you can do. The following commands can be very helpful, because you need them quite often, for example if you want to fill a blog with new content on a daily or weekly basis or if you want to manage a team in WordPress.

Manage users

With the command "wp_user" you can create users, assign roles and enter information. Pretty handy when your team is constantly on the move and changing.

Manage comments

Another handy command is "wp_comment". Here you can delete, create, update and moderate comments. No more 10 clicks, one command.

Configure permalinks

Permalinks are very important for SEO. If they are well structured, it helps to rank on Google and other search engines. With the command "wp_rewrite" you can set the structure of the permalinks. You can also list the links or update them completely.

More helpful information

A list of commands and installation information can be found directly at WordPress in the Blog. At Com.Lounge and Krautpress there is also some information about command lines and how to automate them. Of course it is also worth mentioning the official site WP-CLI. There you can join the project, read the blog and follow the updates. There is also a general overview of WP-CLI.

You need WordPress help?

Contact us without obligation and we will see what we can do for you. We are an agency with many years of experience in the field of WordPress, Web design and Marketing and can advise and support you in many ways. We look forward to Your message!

Send email
Say hi!

Sebastian Lochbronner
86830 Schwabmünchen
Germany

Social

Lochbronner Design Studio goes codeblick - read article here