Project

General

Profile

Actions

Download WP if you need it

Download WP-CLI Phar Archive:

Run the following command to download the WP-CLI Phar archive:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Make WP-CLI Executable:

Make the downloaded Phar file executable:

chmod +x wp-cli.phar

Move WP-CLI to a Global Location:

Move the Phar file to a location in your PATH to make it globally available. For example:

sudo mv wp-cli.phar /usr/local/bin/wp

Note: The exact location may vary depending on your system's configuration. /usr/local/bin is a common location for user-installed executables.

Verify WP-CLI Installation:

Verify that WP-CLI is installed correctly by running:

wp --version

You should see the WP-CLI version displayed without any errors.

By following these steps, you will have a reliable and globally accessible installation of WP-CLI on your system. This method allows you to use WP-CLI to manage your WordPress installations from the command line easily.

Updated by Gareth Eaton 8 months ago · 1 revisions