CLI for WordPress
We will be using a tool called WP-CLI, which allows us to do many things in WordPress that traditionally require a web browser.
Note
WP-CLI is the CLI for WordPress. You can update plugins, configure multisite installs, and much more, without using a web browser. For more information on WP-CLI, visit https://WP-CLI.org/, and for WordPress, visit https://wordpress.org/.
For example, the following command will download and set up a WordPress:
wp core install # with some options such as url, title of the website etc. etc.
A complete example can be found at https://developer.WordPress.org/cli/commands/core/#examples:
wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com
This example gives us a glimpse of the power of the WP-CLI tool when invoked from an Ansible playbook.