WordPress Command Line aka WP CLI Pro Guide in Urdu | Hindi
By : Farooq Shah
Publish Date : February 12, 2021

Step by Step WordPress Command Line Installation (WP CLI) on Windows 10 Pro Guide in Urdu & Hindi to manage WordPress without Browser.

In this follow up task, we discussed in detail how to set up Environment Variables in Windows OS for PHP & MySQL (MariaDB).

How to download wp-cli.phar:

Step 1 : Go to wp-cli.org. Click on Alternative Methods (Go to windows installing method). Download wp-cli.phar as shown in the tutorial.
Step 2: Create a new folder in C:// Let say wp-cli
Step 3: Create a text file wp.bat within
Step 4: Open wp-bat in editor and type
php “c:/wp-cli/wp-cli.php” %*
Step 5: Add the same path in Environment Variables as shown in the video.

Let’s Install WordPress on Localhost with wp-cli:

Step 1: Open CMD as Admin
Step 2: C:\cd xampphtdocs
Step 3: C:xampphtdocsmkdir FarooqVision (create empty folder to install WP)
Step 4: c:xampphtdocscd FarooqVision
cls to clear screen
Step 5: c:xampphtdocsFarooqVision wp core download and hit enter
Step 6: c:xampphtdocsFarooqVisiondir it will show files. clear screen
Step 7: Create a config file as under :
c:xampphtdocsFarooqVisionwp config create –dbname=FVisionDB –dbuser=root Hit enter (Make sure your xampp is running or restarted)
c:xampphtdocsFarooqVisionwp db create (Hit enter) DB will be created but empty. Check in mysql xampp admin dashboard phpmysql
Step 8: c:xampphtdocsFarooqVisionwp core install –url=localhost –title=FarooqVision –admin_user=TheSpartan –admin_password=Special090 –admin_email=dummylo@gmail.com and hit enter
Step 9 : c:xampphtdocsFarooqVisionwp server –host=localhost –port=8080 hit enter
Step 10 : Open another cmd
c:xampphtdocsFarooqVisionwp theme list (it will show all themes)
Step 11: c:xampphtdocsFarooqVisionwp theme activate (to activate specific themes)
Step 12: c:xampphtdocsFarooqVisionwp theme install hello-elementor –activate NOTE: You need (theme slug)
Step 13: Open site admin dashboard by logging in.
Step 14 : To delete something, first deactivate and then delte.

We did the same for Laragon (Modern Local Web Development Environment).

Additional Commands:

c:xampphtdocsFarooqVision wp theme delete theme-slug
c:xampphtdocsFarooqVisionwp plugin list
c:xampphtdocsFarooqVisionwp plugin activate hello
c:xampphtdocsFarooqVisionwp plugin install plugin-slug –activate
c:xampphtdocsFarooqVisionwp plugin delete pluginslug
c:xampphtdocsFarooqVisionwp plugin list

We also discussed the well know wp scaffold command (To create barebone structure of plugin, block and theme etc).

Farooq Hussain Shah
Spartans’ WordPress Trainer