{"id":8729,"date":"2022-06-28T10:54:33","date_gmt":"2022-06-28T09:54:33","guid":{"rendered":"https:\/\/www.20i.com\/blog\/?p=8729"},"modified":"2026-01-08T13:10:38","modified_gmt":"2026-01-08T13:10:38","slug":"get-started-wpcli","status":"publish","type":"post","link":"https:\/\/www.20i.com\/blog\/get-started-wpcli\/","title":{"rendered":"WP-CLI guide: manage WordPress using the command line"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One of the big reasons why WordPress is so successful is down to how easy it is to get a website set up and running. It can literally be minutes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, as your website grows, or you start to manage multiple WordPress-powered websites, you&#8217;ll soon find certain tasks within the WordPress admin area become tedious and time consuming. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigating between admin pages, waiting for pages to load, updating themes\/plugins&#8230;it all builds up. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress are aware of this and have provided a solution; step forward the WordPress Command Line Interface: WP-CLI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>In this article, I\u2019ll cover how to install and configure WordPress, install themes, plugins and set up users using WP-CLI.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#what\">What is WP-CLI<\/a><\/li>\n\n\n\n<li><a href=\"#download-wordpress\">Download WordPress with WP-CLI<\/a><\/li>\n\n\n\n<li><a href=\"#install-wordpress\">Install WordPress with WP-CLI<\/a><\/li>\n\n\n\n<li><a href=\"#themes-and-plugins\">Manage Themes and Plugins with the CLI<\/a><\/li>\n\n\n\n<li><a href=\"#theme-commands\">Theme update commands in WordPress CLI<\/a><\/li>\n\n\n\n<li><a href=\"#plugin-commands\">WordPress CLI plugin commands<\/a><\/li>\n\n\n\n<li><a href=\"#create-users\">Create users using the WordPress CLI<\/a><\/li>\n\n\n\n<li><a href=\"#experimenting\">Get experimenting with WP-CLI<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what\">What is WP-CLI?<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"289\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/wp-cli-logo.png\" alt=\"WP-CLI logo\" class=\"wp-image-8738\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/wp-cli-logo.png 600w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wp-cli-logo-300x145.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wp-cli-logo-370x178.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wp-cli-logo-270x130.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wp-cli-logo-570x275.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wp-cli-logo-150x72.png.webp 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress CLI is the command line interface for WordPress. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will allow you to manage certain aspects of your WordPress website without having to log in to the wp-admin area. You\u2019ll be able to install and update plugins and themes, update WordPress core version and much more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">WP-CLI is readily available with your 20i hosting and can be accessed through SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Essentially, whatever task you need to do in wp-admin, there is usually an equivalent with WP-CLI. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you\u2019ll be able to complete the task with much less navigation and not wait for a page in wp-admin to load, using WP-CLI for those tasks will be much quicker.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re already familiar with SSH and the command line, WP-CLI won\u2019t be daunting to use and will be a great addition to your developer tools. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re a beginner or not familiar with command line, this article will be a good starting point for you.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"download-wordpress\">Download WordPress with WP-CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Downloading WordPress using WP-CLI will mainly apply to your website if it is hosted on our Shared Linux Hosting platform. Websites hosted on our <a href=\"https:\/\/www.20i.com\/wordpress-hosting\">optimised WordPress hosting platform<\/a> will already provision with WordPress files pre-installed. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If this is your first-time using command line and WP-CLI and you\u2019re just looking to play around and experiment, I recommend to create a new non-live hosting package or a directory which will not affect your live website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, you will need to access your website via SSH. We have a support guide on <a href=\"\/support\/reseller-hosting\/connect-via-ssh\" target=\"_blank\" rel=\"noreferrer noopener\">how to connect your website using SSH<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;ve successfully configured SSH and connected to your website, you will be placed in the root of the website. You can check the current directory by running this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pwd<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will output the path to your current directory in the following format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/Path\/to\/your\/current\/directory<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to create a directory to download WordPress in to, you can use the \u2018mkdir\u2019 command to create the directory. The following example will create&nbsp; \u2018wordpress\u2019 directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir wordpress<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can then navigate to the directory using the \u2018cd\u2019 command. Here is an example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd wordpress<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can check the directory by running pwd as before this will output the path to the directory, i.e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Path\/to\/directory\/wordpress<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you\u2019re in the directory you want to install WordPress in to, you can now download WordPress using WP-CLI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every WP-CLI command will start with \u2018wp\u2019 and then a following command. The following command will download WordPress in your current directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp core download<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"94\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/screenshot-of-wordpress-being-downloaded-via-cli.png\" alt=\"WordPress core download in wp-cli\" class=\"wp-image-8748\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/screenshot-of-wordpress-being-downloaded-via-cli.png 600w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/screenshot-of-wordpress-being-downloaded-via-cli-300x47.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/screenshot-of-wordpress-being-downloaded-via-cli-400x63.png.webp 400w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/screenshot-of-wordpress-being-downloaded-via-cli-150x24.png.webp 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">WordPress core download<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-wordpress\">Install WordPress with WP-CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once WordPress has downloaded, you&#8217;ll be able to continue with the installation process using WP-CLI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please note, if you haven\u2019t created a <strong>database<\/strong>, you will need to do so. Then, you\u2019ll need to create or update your wp-config.php file to connect to the database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can create a database via <a href=\"https:\/\/www.20i.com\/my20i\">My20i hosting control panel<\/a> &gt; \u2018MySQL Databases\u2019. You can find detailed instructions here: <a href=\"https:\/\/www.20i.com\/support\/databases\/create-mysql-database\" target=\"_blank\" rel=\"noreferrer noopener\">Create a MySQL database<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"192\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/Database-creation.png\" alt=\"MySQL databases in the My20i control panel\" class=\"wp-image-8749\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/Database-creation.png 600w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/Database-creation-300x96.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/Database-creation-370x118.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/Database-creation-270x86.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/Database-creation-570x182.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/Database-creation-150x48.png.webp 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">My20i databases<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you\u2019ve created the database, you can create a wp-config.php file with your database credentials by using the following WP-CLI command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp config create --dbname='dbname-example' --dbuser='db-user-example' --dbhost='db-host.mysql.example' --dbpass='strongpassword'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You will just need replace the data between the quote marks with your real database credentials. I\u2019ve broken down what each part of the command is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2018--dbname=\u2019 This is where you\u2019d input your database name \n\u2018--dbuser=\u2019 Where you\u2019d input your database username \n\u2018--dbhost=\u2019 Your database hostname \n\u2018--dbpass=\u2019 Database password<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Your WordPress installation will now be connected to the database you\u2019ve created, and you can complete your WordPress install.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following command will set the website URL, website title, create the admin user, password and email.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp core install --url='yourdomain.com' --title='yourwebsitename' --admin_user='admin' --admin_password='strongpassword' --admin_email='user@example.com'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As before, you\u2019ll just need to replace the data between the quote marks with the real details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once that&#8217;s done, your WordPress website should be up and ready.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"360\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/rsz_2wpexample.png\" alt=\"WordPress theme\" class=\"wp-image-8750\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/rsz_2wpexample.png 675w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_2wpexample-300x160.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_2wpexample-370x197.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_2wpexample-270x144.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_2wpexample-570x304.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_2wpexample-150x80.png.webp 150w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><figcaption class=\"wp-element-caption\">WordPress theme<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"themes-and-plugins\">Manage Themes and Plugins with WP-CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now your WordPress installation has completed, you can now start installing your plugins and themes. Here are some simple commands which should help you get started with plugin and theme management. We\u2019ll start with theme related commands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll be able to install a theme directly from wordpress.org using WordPress CLI, which will be the latest version<ins>,<\/ins> or you can install from a local or remote zip file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme install &lt;theme|zip|url&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some examples of each option:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will install the latest version from wordpress.org and activate the theme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme install twentytwentytwo --activate<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"133\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/wordpress-theme-installing-via-cli.png\" alt=\"WordPress theme installed using WordPress CLI\" class=\"wp-image-8751\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/wordpress-theme-installing-via-cli.png 600w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wordpress-theme-installing-via-cli-300x67.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wordpress-theme-installing-via-cli-400x89.png.webp 400w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wordpress-theme-installing-via-cli-150x33.png.webp 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">WordPress theme installed<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can search for a theme that\u2019s available within wordpress.org by using the following command in WP-CLI:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme search &lt;keyword&gt;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"411\" height=\"254\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/wpthemesearch.png\" alt=\"Searching for a theme in wp-cli\" class=\"wp-image-8752\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/wpthemesearch.png 411w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wpthemesearch-300x185.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wpthemesearch-370x229.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wpthemesearch-270x167.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/wpthemesearch-150x93.png.webp 150w\" sizes=\"auto, (max-width: 411px) 100vw, 411px\" \/><figcaption class=\"wp-element-caption\">WordPress theme search<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can then install a theme by using the \u2018slug\u2019 name in your command<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will install from a local zip file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme install path\/to\/zip-file.zip<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will install from a zip file that is located remotely<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme install http:\/\/domain.com\/wp-theme.zip<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"177\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/rsz_wpthemeinstalllocalzip.png\" alt=\"Installing a theme in wp-cli successfully\" class=\"wp-image-8753\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/rsz_wpthemeinstalllocalzip.png 600w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_wpthemeinstalllocalzip-300x89.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_wpthemeinstalllocalzip-370x109.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_wpthemeinstalllocalzip-270x80.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_wpthemeinstalllocalzip-570x168.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/06\/rsz_wpthemeinstalllocalzip-150x44.png.webp 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">Install theme<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If this was successful, you&#8217;ll see the same \u2018success\u2019 message as above in the screenshot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"theme-commands\">Theme update commands in WP-CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The following commands will update the themes that you\u2019ve installed to your WordPress installation. The usual practice would be to do this in the wp-admin area but by using WP-CLI the process will be much quicker.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Update a theme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme update &lt;theme name&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Update multiple themes<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme update twentytwentytwo twentytwentyone<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Update all themes<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme update --all<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Exclude a theme when bulk updating themes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme update --all --exclude=twentytwentyone<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Activate a theme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme activate &lt;theme&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Deactivate a theme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme deactivate &lt;theme&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"plugin-commands\">Plugin commands<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the same way as above, you can install a plugin from wordpress.org, a local zip file or a remote zip file via a URL<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install the latest plugin from wordpress.org and activate:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin install &lt;plugin name&gt; --activate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install from a local zip file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin install path\/to\/plugin.zip<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To install from a remote zip file via a URL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin install https:\/\/domain.com\/wp-plugin.zip<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Update a plugin or multiple plugins:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin update &lt;plugin name&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Activate plugin or multiple plugins:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin activate &lt;plugin&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Deactivate plugin or multiple plugins:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin deactivate &lt;plugin&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you have your desired themes and plugins installed, you\u2019ll be able to view a list of what you have installed, status, if an update is available and the version of plugin or theme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will display something like the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | status&nbsp;&nbsp; | update | version |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| phox-child&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | inactive | none&nbsp;&nbsp; | 1.0.0&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| phox&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | none&nbsp;&nbsp; | 2.1.4&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| twentytwenty&nbsp;&nbsp;&nbsp; | inactive | none&nbsp;&nbsp; | 1.9&nbsp;&nbsp;&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| twentytwentyone | inactive | none&nbsp;&nbsp; | 1.5&nbsp;&nbsp;&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| twentytwentytwo | inactive | none&nbsp;&nbsp; | 1.1&nbsp;&nbsp;&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | status&nbsp;&nbsp; | update&nbsp;&nbsp;&nbsp; | version |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| akismet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | available | 4.2.2&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| contact-form-7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | available | 5.5.6&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| elementor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 3.6.5&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| envato-market&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 2.0.7&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| hello&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.7.2&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| one-click-demo-import | active&nbsp;&nbsp; | none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 3.1.1&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| phox-host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.7.6&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| really-simple-ssl&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | available | 5.3.1&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| revslider&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | active&nbsp;&nbsp; | none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 6.5.19&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">| wp-stack-cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | must-use | none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-users\">Create WP Users using the WordPress CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So that\u2019s your WordPress website mostly set up. If you want to add additional WordPress admin users to your website, you can do so using WP-CLI. Here&#8217;s an example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp user create \u2018user\u2019 \u2018user@example.com\u2019 --role=\u2018\u2019<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You will just need to fill the data between the quote marks. For the role of the user, possible values are \u2018administrator\u2019, \u2018editor\u2019, \u2018author\u2019, \u2018contributor\u2019, \u2018subscriber\u2019.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are additional options you can add to the above command, here are a few examples<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--user_pass<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will create the password for the user<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--send-email<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Sends the user an email with their new account credentials<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--porcelain<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will output just the user ID after running the command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, your command will look something like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp user create 'user' 'user@example.com' --role='administrator' --user_pass='superstrongpassword' --send-email<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll just need to replace the data between the quote marks (\u2018\u2019) with the real data. After the command is run, you&#8217;ll have successfully set up the user using WP-CLI.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"experimenting\">Get experimenting with WP-CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hopefully this guide has been helpful and given you a feel for WP-CLI and the benefits of speed and efficiency it offers. <ins><\/ins><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can create a WordPress install, install and manage themes and create users very quickly. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide is just a starting point and you can build on your knowledge by exploring the commands on the <a href=\"https:\/\/developer.wordpress.org\/cli\/commands\/\">WordPress official website<\/a> and having a play around with them in your 20i <a href=\"https:\/\/www.20i.com\/wordpress-hosting\">WordPress Hosting<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s a great way to impress clients with your \u2018leet codr\u2019 skills! <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Are there WP-CLI commands you make of use regularly? Let us know below.<\/p>\n\n\n<div class='code-block code-block-4' style='margin: 8px 0; clear: both;'>\n<hr>\n<br \/><a href=\"https:\/\/www.20i.com\/wordpress-hosting\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2026\/03\/Blog-Ad-WordPress-1200x625-1.png\" loading=\"lazy\" alt=\"Managed WordPress Hosting\"><\/a><\/div>\n\n\n\n\n<script type=\"application\/ld+json\">\n{\"@context\":\"http:\/\/schema.org\",\n\"@type\":\"Webpage\",\"name\":\"WordPress Hosting \u2013 20i\",\"url\":\"https:\/\/www.20i.com\/wordpress-hosting\",\n\"@id\":\"https:\/\/www.20i.com\/wordpress-hosting#webpage\"}\n<\/script>\n<script type=\"application\/ld+json\">\n{\"@context\":\"http:\/\/schema.org\",\n\"@type\":\"WebPage\",\n\"@id\":\"https:\/\/www.20i.com\/blog\/get-started-wpcli\/#webpage\",\n\"url\":\"https:\/\/www.20i.com\/blog\/get-started-wpcli\/\",\n\"inLanguage\":\"en-gb\",\n\"name\":\"Get started with WP-CLI \",\n\"description\":\"WP-CLI. In this article, How to install and configure WordPress, install themes, plugins and set up users using WP-CLI.\",\n\"image\": \"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/WP-CLI-getting-started-guide-min-740x416.png\",\n\"isPartOf\":{\"@id\":\"https:\/\/www.20i.com\/wordpress-hosting#webpage\"},\n  \"about\": [\n    {\"@type\": \"Thing\", \"name\": \"CLI\", \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/Command-line_interface\"},\n{\"@type\": \"Thing\", \"name\": \"WordPress\", \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/WordPress\"}\n],\n  \"mentions\": [\n  {\"@type\": \"Thing\", \"name\": \"Theme\", \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/WordPress#Themes\"},\n  {\"@type\": \"Thing\", \"name\": \"Plugins\", \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/WordPress#Plugins\"},\n  {\"@type\": \"Thing\", \"name\": \"zip file\", \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/ZIP_(file_format)\"},\n  {\"@type\": \"Thing\", \"name\": \"URL\", \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/URL\"}\n\n\n]\n}\n<\/script>\n\n<script type=\"application\/ld+json\">\n{ \n\"@context\": \"http:\/\/schema.org\", \n\"@type\": \"FAQPage\", \"@id\": \"https:\/\/www.20i.com\/blog\/get-started-wpcli\/#FAQ\",\n\"url\": \"https:\/\/www.20i.com\/blog\/get-started-wpcli\/\", \n\"headline\": \"What is WP-CLI\", \n\"isPartOf\":{\"@id\":\"https:\/\/www.20i.com\/blog\/get-started-wpcli\/#webpage\"},\n\"inLanguage\":\"en-gb\",\n      \"mainEntity\": [\n   {\n     \"@type\": \"Question\",\n    \"name\": \"What is WP-CLI?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"<p>WP-CLI is the command line interface for WordPress. <\/p>\n<p>This will allow you to manage certain aspects of your WordPress website without having to log in to the wp-admin area. You\u2019ll be able to install and update plugins and themes, update WordPress core version and much more. <\/p>\n<p>WP-CLI is readily available with your 20i hosting and can be accessed through SSH. <\/p>\n<p>Essentially, whatever task you need to do in wp-admin, there is usually an equivalent with WP-CLI. <\/p>\n<p>As you\u2019ll be able to complete the task with much less navigation and not wait for a page in wp-admin to load, using WP-CLI for those tasks will be much quicker. <\/p>\n\u2003\n<p>If you\u2019re already familiar with SSH and the command line, WP-CLI won\u2019t be daunting to use and will be a great addition to your developer tools. <\/p>\n<p>If you\u2019re a beginner or not familiar with command line, hopefully this article will be a good starting point for you. <\/p>\"\n    }\n  },\n{\n     \"@type\": \"Question\",\n    \"name\": \"Download WordPress with WP-CLI\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"<p>Downloading WordPress using WP-CLI will mainly apply to your website if it is hosted on our Shared Linux Hosting platform. Websites hosted on our WordPress platform will already provision with WordPress files pre-installed.<\/p>\n<p>If this is your first-time using command line and WP-CLI and you\u2019re just looking to play around and experiment, I recommend to create a new non-live hosting package or a directory which will not affect your live website.<\/p>\n\n<p>First, you will need to access your website via SSH. We have a support guide on how to connect your website using SSH.<\/p>\n\n<p>If you\u2019ve successfully configured SSH and connected to your website, you will be placed in the root of the website. You can check the current directory by running this:<\/p>\"\n    }\n  },\n{\n     \"@type\": \"Question\",\n    \"name\": \"Install WordPress with WP-CLI\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"<p>Once WordPress has downloaded, you\u2019ll be able to continue with the installation process using WP-CLI. <\/p><p>Please note, if you haven\u2019t created a database, you will need to do so. Then, you\u2019ll need to create or update your wp-config.php file to connect to the database. <\/p>\n<p>Once you\u2019ve created the database, you can create a wp-config.php file with your database credentials by using the following WP-CLI command: <\/p>\n<p>Your WordPress installation will now be connected to the database you\u2019ve created, and you can complete your WordPress install. <\/p>\n<p>The following command will set the website URL, website title, create the admin user, password and email. <\/p>\"\n    }\n  },\n{\n     \"@type\": \"Question\",\n    \"name\": \"Manage Themes and Plugins with WP-CLI\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"<p>Now your WordPress installation has completed, you can now start installing your plugins and themes. Here are some simple commands which should help you get started with plugin and theme management. We\u2019ll start with theme related commands.<\/p>\n<p>You\u2019ll be able to install a theme directly from wordpress.org using WP-CLI, which will be the latest version, or you can install from a local or remote zip file.<\/p>\"\n    }\n  },\n{\n     \"@type\": \"Question\",\n    \"name\": \"Create WP Users using WP-CLI\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"So that\u2019s your WordPress website mostly set up. If you want to add additional WordPress admin users to your website, you can do so using WP-CLI. Here is an example:\"\n    }\n  }\n] \n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"One of the big reasons why WordPress is so successful is down to how easy it is to&hellip;","protected":false},"author":25,"featured_media":8762,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"ub_ctt_via":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[51,60],"tags":[76],"class_list":["post-8729","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology","category-web-design-dev","tag-wordpress","cs-entry"],"featured_image_src":"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/06\/WP-CLI-getting-started-guide-min.png","author_info":{"display_name":"Ben Perry","author_link":"https:\/\/www.20i.com\/blog\/author\/benperry92\/"},"_links":{"self":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/8729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/comments?post=8729"}],"version-history":[{"count":25,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/8729\/revisions"}],"predecessor-version":[{"id":18207,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/8729\/revisions\/18207"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/media\/8762"}],"wp:attachment":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/media?parent=8729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/categories?post=8729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/tags?post=8729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}