Use the WP-CLI command line tool

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

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:

$ installdir/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 installdir/apps/wordpress/htdocs
$ sudo installdir/ restart apache
Last modification April 8, 2020