WP-CLI is a powerful command line tool that allows the user to manage the WordPress Website. It can help you perform WordPress core updates, plugin management, theme installation, database backups, and other tasks more efficiently. In Linux Installing WP-CLI on your system is very simple, here are the complete installation steps.
![Image [1]-How to install WP-CLI on Linux and get started](https://www.361sale.com/wp-content/uploads/2025/06/20250624094249853-image.png)
1. Download the Phar build file
First, you need to download the Phar build file for WP-CLI. You can use the wget maybe curl command to accomplish this:
utilization wget::
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Or use curl::
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Once the download is complete, the next step is to check that the downloaded Phar file works.
![Image [2]-How to install WP-CLI on Linux and get started](https://www.361sale.com/wp-content/uploads/2025/06/20250624095515378-image.png)
2. Check that the Phar file is working.
In order to check if the file can be executed properly, make sure that your server has installed the PHP(If you have WordPress installed, PHP should already be installed). Then, run the following command:
php wp-cli.phar --info
If the Phar file executes properly, you should see a message similar to the following:
WP-CLI 2.5.0
PHP: 7.4.3
![Image [3] - How to install WP-CLI on Linux and get started](https://www.361sale.com/wp-content/uploads/2025/06/20250624095537430-image.png)
3. Turning Phar files into executables
Although we can use the php wp-cli.phar {command} to execute WP-CLI, but it's very inconvenient to enter commands this way every time. Therefore, we need to turn this Phar file into an executable and move it to the system path for subsequent use.
Execute the following command:
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
When finished, the system will not return any information. If no error is reported, the file has been successfully moved to the /usr/local/bin Catalog.
4. Test that WP-CLI is installed successfully.
To test if WP-CLI was successfully installed, you can run the following command:
wp --info
If all is well, you will see a message similar to the following:
WP-CLI 2.5.0
PHP: 7.4.3
this means WP-CLI Successful installation allows you to start using command line management WordPress Site up.
![Image [4] - How to install WP-CLI on Linux and get started](https://www.361sale.com/wp-content/uploads/2025/06/20250624095606675-image.png)
summarize
With these steps, you have successfully installed the WP-CLI. Now it's possible to manage WordPress more efficiently using the command line, and tasks such as updating the core, managing plugins, and switching themes have become much easier. If you haven't installed WP-CLI yet, you can refer to this guide to easily install and start using it.
Link to this article:https://www.361sale.com/en/62490The article is copyrighted and must be reproduced with attribution.




















![Emoji[wozuimei]-Photonflux.com | Professional WordPress repair service, worldwide, rapid response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![Emoticon[baoquan] - Photon Wave Network | Professional WordPress Repair Services, Worldwide Coverage, Rapid Response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments