azurewordpress-pro

Use the WP-CLI command line tool

WP-CLI is the command-line interface for WordPress. You can update plugins, configure multisite installs and much more, without using a Web browser. It is already included with the Bitnami solution so you can start using it easily. In order to check that everything is working properly, you can run the info command:

$ /opt/bitnami/apps/wordpress/bin/wp cli info

NOTE: The wp utility is also included in the system path so you can run the command without specifying the whole path to the file.

To update WordPress using WP-CLI, you need to allow WP-CLI to perform the operation as the root user, as shown below:

$ sudo bin/wp core update --allow-root

As that command changes the ownership of some files to root, you need to reset the file ownership and then restart Apache for the update to take effect:

$ sudo chown -R daemon /opt/bitnami/apps/wordpress/htdocs
$ sudo /opt/bitnami/ctlscript.sh restart apache
Last modification April 8, 2020