exist WordPress In the course of development or maintenance, we often come across premium plugins or themes from third parties, which usually start as .zip Instead of getting them directly from the official wordpress.org repositories, the zip files are provided in the form of files. In this case, installing these zip files with the help of WP-CLI will be much more efficient.
In this article, we will explain in detail how to use the WP-CLI The complete process of installing plugins and themes in local or remote zip file format.
![Image [1]-Tutorial for installing WordPress plugins and theme ZIP files using WP-CLI](https://www.361sale.com/wp-content/uploads/2025/07/20250710094241222-image.png)
Prerequisites: WP-CLI installed on the server
Before you start, please make sure that WP-CLI is installed in your server environment. if it is not, please refer to another article: [How to Install WP-CLI on Linux]
Step 1: Go to the WordPress installation directory
First, use the terminal (CLI) to go to the WordPress installation directory. For example, if your site is located:
web/wpgan.tld/public_html
The catalog can be accessed using the following command:
cd web/wpgan.tld/public_html
![Image [2]-Tutorial for installing WordPress plugins and theme ZIP files using WP-CLI](https://www.361sale.com/wp-content/uploads/2025/07/20250710094313669-image.png)
Step 2: Create a temporary folder for storing the zip file
After entering the WordPress root directory, it is recommended to create a temporary folder (e.g. tmp) to store the downloaded zip file:
mkdir tmp
cd tmp
![Image [3]-Tutorial for installing WordPress plugins and theme ZIP files using WP-CLI](https://www.361sale.com/wp-content/uploads/2025/07/20250710094320712-image.png)
Step 3: Add the plugin or theme zip file
You can use the wget,curl maybe FTP Upload by placing the zip file in the folder. Example:
Add plugin (Ezsha plugin):
wget https://github.com/mnasikin/Ezsha/archive/refs/heads/main.zip
Add theme (Hello Elementor example):
wget https://downloads.wordpress.org/theme/astra.4.7.0.zip
After the download is complete, you can use the ls command to confirm that the zip file was downloaded successfully:
ls
![Image [4]-Tutorial for installing WordPress plugins and theme ZIP files using WP-CLI](https://www.361sale.com/wp-content/uploads/2025/07/20250710094340820-image.png)
Step 4: Install the plugin or theme zip file
Return to the WordPress installation directory:
cd ...
Installation of plug-ins
wp plugin install tmp/main.zip
If you wish to enable the plugin directly after installation, you can add the --activate Parameters:
wp plugin install tmp/main.zip --activate
Install Theme
commander-in-chief (military) plugin Replace with theme Ready to go:
wp theme install tmp/astra.4.7.0.zip --activate
After successful installation, the terminal will return a message indicating that the plugin or theme has been installed and activated correctly.
![Image [5]-Tutorial for installing WordPress plugins and theme ZIP files using WP-CLI](https://www.361sale.com/wp-content/uploads/2025/07/20250710094351337-image.png)
summarize
utilization WP-CLI Installing plugins and themes in zip format is efficient, clean and suitable for developers and project management in VPS environments. If you want to install plugins or themes directly from the official WordPress repositories, you can also read our other tutorials:
Link to this article:https://www.361sale.com/en/66682The 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