{"id":7893,"date":"2021-12-20T15:56:14","date_gmt":"2021-12-20T15:56:14","guid":{"rendered":"https:\/\/hosting4agency.com\/green-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/"},"modified":"2026-06-05T22:28:52","modified_gmt":"2026-06-05T22:28:52","slug":"wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template","status":"publish","type":"post","link":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/","title":{"rendered":"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template]"},"content":{"rendered":"\n<p><strong>WP-CLI<\/strong> is a command-line tool for WordPress website developers and maintainers, allowing them to manage common (and not so common!) activities such as adding or removing users, articles, categories, as well as performing searches and replacements in the database\u2026 All of this in a targeted or bulk manner according to one&#8217;s needs.<\/p>\n\n<p>It is a stable project that has nearly ten years of development behind it and whose source code is hosted, like many other open-source software including the same WordPress, on the platform <strong>GitHub<\/strong>.<\/p>\n\n<p>The WP-CLI is a tool that web professionals should not refrain from using. Let&#8217;s see how to install and use it right away.<\/p>\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#f2f2f2\">\n<p><strong>Table of contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#requisites-for-wp-cli-installation\">Requisites for WP-CLI installation<\/a><\/li>\n\n\n\n<li><a href=\"#how-to-install-wp-cli\">How to install WP-CLI<\/a><\/li>\n\n\n\n<li><a href=\"#common-cli-commands\">Common CLI Commands<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#installazione-attivazione-tema\">Install and activate a theme<\/a><\/li>\n\n\n\n<li><a href=\"#installazione-di-wordpress\">Install WordPress<\/a><\/li>\n\n\n\n<li><a href=\"#reinstallare-il-core\">Reinstall the WordPress core<\/a><\/li>\n\n\n\n<li><a href=\"#change-wp-url\">Change WordPress URL<\/a><\/li>\n\n\n\n<li><a href=\"#get-plugin-list\">Get a list of plugins<\/a><\/li>\n\n\n\n<li><a href=\"#install-plugin\">Install plugin<\/a><\/li>\n\n\n\n<li><a href=\"#disable-plugins\">Disable multiple plugins&#8230; or all plugins<\/a><\/li>\n\n\n\n<li><a href=\"#update-plugin\">Update plugin<\/a><\/li>\n\n\n\n<li><a href=\"#find-and-replace-in-database\">Find and replace in database<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#summary\">WP-CLI: Summary<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n<\/div>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"requisiti-installazione-wp-cli\" class=\"wp-block-spacer\"><\/div>\n\n<h2 class=\"wp-block-heading\">Requirements for installing WP-CLI<\/h2>\n\n<p>Let&#8217;s first see what the system requirements are to be able to install the WP-CLI:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Unix-like Environment (OS X, Linux, FreeBSD, Cygwin)<\/li>\n\n\n\n<li>PHP &gt; 5.6<\/li>\n\n\n\n<li>WordPress &gt;= 3.7, keeping in mind that as the WordPress version grows, more features become available<\/li>\n<\/ul>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"come-installare-wp-cli\" class=\"wp-block-spacer\"><\/div>\n\n<h2 class=\"wp-block-heading\">How to install WP-CLI<\/h2>\n\n<p>To install WP-CLI it is advisable to always refer to the <a href=\"https:\/\/wp-cli.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">official site<\/a>, and the procedure we report below is at the end of 2021:<\/p>\n\n<p>Download the executable file:<\/p>\n\n<pre class=\"wp-block-code\"><code>curl -O https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/code><\/pre>\n\n<p>Check the integrity:<\/p>\n\n<pre class=\"wp-block-code\"><code>php wp-cli.phar --info<\/code><\/pre>\n\n<p>Give execution permissions:<\/p>\n\n<pre class=\"wp-block-code\"><code>chmod +x wp-cli.phar<\/code><\/pre>\n\n<p>We move to a standard folder for system executable files:<\/p>\n\n<pre class=\"wp-block-code\"><code>sudo mv wp-cli.phar \/usr\/local\/bin\/wp<\/code><\/pre>\n\n<p>Verify that everything went smoothly with a generic command that returns the WP-CLI version and other installation details:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp --info<\/code><\/pre>\n\n<p>In subsequent updates, if we wish to make an update, it will be sufficient to launch:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp cli update<\/code><\/pre>\n\n<p>Once installed, we can navigate to the folder hosting a WordPress site and begin launching commands for all operations we need.<\/p>\n\n<p>It is good to keep in mind that commands are always referred to the installation of the current folder (with the possibility of operating on WordPress &#8220;multi-site&#8221;, where multiple sites coexist in a single folder with the same files) and if the CLI detects that there is no WordPress installation in the file system location where we find ourselves, it will throw an error.<\/p>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"come-installare-wp-cli\" class=\"wp-block-spacer\"><\/div>\n\n<h2 class=\"wp-block-heading\">General syntax<\/h2>\n\n<p>WP-CLI is a classic command-line tool: commands always start with &#8220;wp&#8221; followed by a command and a subcommand, which are in turn followed by mandatory and optional parameters, with or without values.<br\/><br\/>The general syntax is therefore of this type:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp command subcommand requiredparam --optionalparam1 --optionalparam2=value<\/code><\/pre>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"comandi-piu-comuni\" class=\"wp-block-spacer\"><\/div>\n\n<h2 class=\"wp-block-heading\">Common CLI Commands<\/h2>\n\n<p>There are several CLI commands that are not only rather common but that you should absolutely know to make the best use of this tool.<\/p>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"installazione-attivazione-tema\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Install and activate a theme<\/h3>\n\n<p>In this case we install and activate Twenty Twenty-One, the current default theme, which we might not yet have available if our WordPress is a bit outdated:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp theme install twentytwentyone --activate<\/code><\/pre>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"installazione-di-wordpress\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Install WordPress<\/h3>\n\n<p>You can use WP-CLI to configure test environments, whose first step is a &#8220;vanilla&#8221; installation, a standard WordPress without frills:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp core download\nwp core config --dbname=mydbname --dbuser=mydbuser --dbpass=mydbpass --dbhost=localhost --dbprefix=whebfubwef_ --extra-php &lt;&lt;PHP\ndefine( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\nwp db create\nwp core install --url=http:\/\/siteurl.com --title=SiteTitle --admin_user=username --admin_password=mypassword --admin_email=my@email.com\n<\/code><\/pre>\n\n<p>Let&#8217;s see what we have done in detail\u2026<br\/><br\/>With the first command, the latest version of WordPress is downloaded.<\/p>\n\n<p>The second command sets the configuration file with database access and some additional PHP lines at the end. In this case, the added constants ensure that our debugging options are active for the test environment.<\/p>\n\n<p>The third command creates the database (WP-CLI uses the database access information from the configuration file) and finally installs WordPress using a couple of parameters.<\/p>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"reinstallare-il-core\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Reinstall WordPress core<\/h3>\n\n<p>We can also reinstall the WordPress core using WP-CLI, if for some reason we fear that our installation is corrupted. The following command, in fact, will download the WordPress core without the default themes and plugins.<\/p>\n\n<pre class=\"wp-block-code\"><code>wp core download --skip-content --force<\/code><\/pre>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"cambiare-url\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Change WordPress URL<\/h3>\n\n<p>There are many reasons why you might need to change your WordPress URL. Perhaps you are changing domains, switching to a subdomain, updating from www to non-www, moving files or even migrating from HTTP to HTTPS. In any case, you can easily use the WordPress update options command:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp option update home 'http:\/\/example.com'\nwp option update siteurl 'http:\/\/example.com'\n<\/code><\/pre>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"ottenere-elenco-plugin\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Get a list of plugins<\/h3>\n\n<p>To obtain a list of plugins currently installed on a site it is sufficient to use the following command: we will see the list, the status (active \/ inactive), the availability of updates and the current version.<\/p>\n\n<pre class=\"wp-block-code\"><code>wp plugin list<\/code><\/pre>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"installare-plugin\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Install plugins<\/h3>\n\n<p>To install more plugins you can simply &#8220;accumulate&#8221; parameters one after another. Here&#8217;s an example that downloads and activates 3 plugins:<\/p>\n\n<pre class=\"wp-block-code\"><code>plugin wp installa advanced-custom-fields jetpack ninja-forms --activate<\/code><\/pre>\n\n<p>Note that the names of the plugins derive from their name (slug) in the repository. The simplest way to understand this is to visit their page and look at the URL.<\/p>\n\n<p>If necessary, you can also install previous versions of WordPress plugins with the attribute &#8211;version.<\/p>\n\n<pre class=\"wp-block-code\"><code>wp plugin install wordpress-seo --version=4.8 --activate<\/code><\/pre>\n\n<p>Ancillary more interesting: you can install plugins from files on any remote server, not just from the official repository. This is particularly useful if you are developing a plugin or using a premium plugin.<\/p>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"disattivare-plugin\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Disable more plugins&#8230; or all plugins<\/h3>\n\n<p>To disable a single plugin you can run the following command.<\/p>\n\n<pre class=\"wp-block-code\"><code>wp plugin deactivate wordpress-seo<\/code><\/pre>\n\n<p>To disable all your plugins simultaneously, instead:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp plugin deactivate --all<\/code><\/pre>\n\n<p>This last one can be useful if you are resolving compatibility issues and you simply need to deactivate all plugins at once. You can then go back and enable them one by one, testing what happens as you proceed.<\/p>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"aggiornare-plugin\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Update plugin<\/h3>\n\n<p>You can also manually update WordPress plugins. For example:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp plugin update wordpress-seo<\/code><\/pre>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"cercare-e-sostituire-nel-database\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\">Search and replace in database<\/h3>\n\n<p>One of the main reasons why it is difficult to migrate a site simply &#8220;copying and pasting&#8221; is that the WP database contains serialized arrays, where we have not only the raw data but also the length of that data. So, for example, if you limit yourself to replacing all instances of http:\/\/testsite.com with http:\/\/livewebsite.com, your serialized arrays will no longer make sense because the character count in strings will not match.<\/p>\n\n<p>The search-replace command first deserializes the arrays, then performs the search and replace, and finally reserializes everything. This can also be done with a simple command:<\/p>\n\n<pre class=\"wp-block-code\"><code>wp search-replace vecchia_stringa nuova_stringa<\/code><\/pre>\n\n<p>Additional parameters allow you to do much more, including previewing what will be replaced using the &#8211;dry-run flag.<br\/><br\/>It should be noted that the &#8220;search-replace&#8221; from CLI is often just a first step, as contents created with specific graphic editors &#8211; such as BeTheme or Elementor &#8211; require specific plugins for URL replacement, as in those cases the data is not simply serialized.<\/p>\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<div class=\"wp-block-group contact-banner-blog has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background:linear-gradient(-30deg,rgb(255,82,82) 0%,rgb(112,63,125) 63%,rgb(40,53,147) 100%)\">\n<p class=\"has-text-align-center has-white-color has-text-color\" style=\"font-size:20px\">Try Hosting4Agency on a site of your choice for 30 days and compare the performance before\/after the trial period!<\/p>\n\n\n\n<div class=\"wp-block-buttons is-horizontal is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-03627597 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/hosting4agency.com\/en\/custom-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">Try for free!<\/a><\/div>\n<\/div>\n<\/div>\n\n<div style=\"height:10px\" aria-hidden=\"true\" id=\"riepilogo\" class=\"wp-block-spacer\"><\/div>\n\n<h2 class=\"wp-block-heading\">WP-CLI: Summary<\/h2>\n\n<p>As you may have noticed, the WP-CLI commands are really numerous, so knowing each of them and learning to make full use of them is not something that can be learned overnight.<\/p>\n\n<p>In Hosting 4 Agency we have accumulated years of daily experience in the use of WP-CLI, to the point that all activation and periodic maintenance scripts we use on our WordPress sites use this technology, allowing us to keep our Managed Hosting infrastructure up-to-date and secure almost automatically (but without giving up the human eye that checks).<\/p>\n\n<p>Furthermore, we can make WP-CLI available to our customers who have chosen the <strong>virtual machine (Virtual Private Server)<\/strong> formula.<\/p>\n\n<p>Bastar\u00e1 accedere alla propria macchina con una connessione SSH e WP-CLI sar\u00e0 gi\u00e0 disponibile e aggiornata, con la possibilit\u00e0 di ricevere supporto dal team di Hosting 4 Agency.<\/p>\n\n<p><strong>If you also wish to entrust the WP-CLI tool, as well as all web optimization services, to a team of professionals.<\/strong> <a href=\"https:\/\/hosting4agency.com\/new.hosting4agency.com\/#contattaci\">Contact us now.<\/a><\/p>\n\n<p>We ensure every day that your websites are always <strong>fast, protected and up to date<\/strong>. Get rid of the stress of deadlines and updates, choose Hosting 4 Agency, your partner for WordPress hosting reseller.<\/p>\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<div class=\"wp-block-group contact-banner-blog has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background:linear-gradient(-30deg,rgb(255,82,82) 0%,rgb(112,63,125) 63%,rgb(40,53,147) 100%)\">\n<p class=\"has-text-align-center has-white-color has-text-color\" style=\"font-size:20px\">Ready to dominate your WordPress site with WP-CLI? Contact us right away and let us help you become the supreme commander of your digital universe!<\/p>\n\n\n\n<div class=\"wp-block-buttons is-horizontal is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-03627597 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"#form-contatto\">Contact us<\/a><\/div>\n<\/div>\n<\/div>\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<h4 class=\"wp-block-heading\">Continue reading<\/h4>\n\n<div class=\"wp-block-query is-layout-flow wp-block-query-is-layout-flow\"><ul class=\"wp-block-post-template is-layout-flow wp-block-post-template-is-layout-flow\"><li class=\"wp-block-post post-8253 post type-post status-publish format-standard has-post-thumbnail hentry category-wordpress-hosting tag-agencies tag-ai tag-web-development\">\n<h5 class=\"wp-block-post-title\"><a href=\"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/automatic-website-translation-for-web-agency-the-zero-api-approach-of-hosting4agency\/\" target=\"_blank\" >Automatic Website Translation for Web Agency: The &#8220;Zero API&#8221; Approach of Hosting4Agency<\/a><\/h5>\n<\/li><li class=\"wp-block-post post-7888 post type-post status-publish format-standard has-post-thumbnail hentry category-wordpress-hosting tag-web-development tag-web-security\">\n<h5 class=\"wp-block-post-title\"><a href=\"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/php-8-5-what-really-changes-for-sites-developers-and-companies\/\" target=\"_blank\" >PHP 8.5: what really changes for sites, developers and companies<\/a><\/h5>\n<\/li><li class=\"wp-block-post post-7895 post type-post status-publish format-standard has-post-thumbnail hentry category-wordpress-hosting tag-website-migration tag-wordpress-plugin\">\n<h5 class=\"wp-block-post-title\"><a href=\"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-all-import\/\" target=\"_blank\" >WP All Import<\/a><\/h5>\n<\/li><\/ul>\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The WP-CLI is a tool that web professionals should not refrain from using, so we will go on to understand how to install and use it.<\/p>\n","protected":false},"author":1,"featured_media":2561,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[116],"tags":[168,163,169],"class_list":["post-7893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-hosting","tag-developer-tools","tag-high-performance-hosting","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WP-CLI Commands: how to use WordPress CLI for your website [wpr-template] - Hosting4Agency<\/title>\n<meta name=\"description\" content=\"Discover everything you need to know about the WordPress WP-CLI tool, so you can make the most of it for your website.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template] - Hosting4Agency\" \/>\n<meta property=\"og:description\" content=\"Discover everything you need to know about the WordPress WP-CLI tool, so you can make the most of it for your website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/\" \/>\n<meta property=\"og:site_name\" content=\"Hosting4Agency\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hosting4agency\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-20T15:56:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-05T22:28:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hosting4agency.com\/wp-content\/uploads\/2021\/12\/Hosting-4-Agency-WPCLI.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Hosting 4 Agency\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hosting 4 Agency\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/\"},\"author\":{\"name\":\"Hosting 4 Agency\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#\\\/schema\\\/person\\\/0973c5551c8bcc591a92709a381e1bed\"},\"headline\":\"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template]\",\"datePublished\":\"2021-12-20T15:56:14+00:00\",\"dateModified\":\"2026-06-05T22:28:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/\"},\"wordCount\":1309,\"publisher\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hosting4agency.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Hosting-4-Agency-WPCLI.jpg\",\"keywords\":[\"Developer Tools\",\"High-Performance Hosting\",\"Web Development\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/\",\"url\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/\",\"name\":\"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template] - Hosting4Agency\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hosting4agency.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Hosting-4-Agency-WPCLI.jpg\",\"datePublished\":\"2021-12-20T15:56:14+00:00\",\"dateModified\":\"2026-06-05T22:28:52+00:00\",\"description\":\"Discover everything you need to know about the WordPress WP-CLI tool, so you can make the most of it for your website.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hosting4agency.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Hosting-4-Agency-WPCLI.jpg\",\"contentUrl\":\"https:\\\/\\\/hosting4agency.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Hosting-4-Agency-WPCLI.jpg\",\"width\":1200,\"height\":800,\"caption\":\"wp cli commands\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/wordpress-hosting\\\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/\",\"name\":\"Hosting 4 Agency\",\"description\":\"Hosting B2B2B per Agenzie\",\"publisher\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#organization\"},\"alternateName\":\"H4A\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#organization\",\"name\":\"Hosting4Agency\",\"url\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/hosting4agency.com\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/cropped-H4A-logo-colori-negativo.png\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/elan42.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/elan42\\\/\"],\"legalName\":\"E42 S.r.l.\",\"vatID\":\"IT04439760275\",\"taxID\":\"04439760275\",\"telephone\":\"+390413034754\",\"address\":{\"@type\":\"PostalAddress\",\"streetAddress\":\"Dorsoduro 3649\",\"addressLocality\":\"Venezia\",\"postalCode\":\"30123\",\"addressRegion\":\"VE\",\"addressCountry\":\"IT\"},\"contactPoint\":{\"@type\":\"ContactPoint\",\"contactType\":\"technical support\",\"telephone\":\"+390413034754\",\"email\":\"info@elan42.com\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hosting4agency.com\\\/en\\\/#\\\/schema\\\/person\\\/0973c5551c8bcc591a92709a381e1bed\",\"name\":\"Hosting 4 Agency\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5ca6e046df97fda2d2ad39ad1d2a68842b251ad3d0d94627063cc12b7ca65579?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5ca6e046df97fda2d2ad39ad1d2a68842b251ad3d0d94627063cc12b7ca65579?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5ca6e046df97fda2d2ad39ad1d2a68842b251ad3d0d94627063cc12b7ca65579?s=96&d=mm&r=g\",\"caption\":\"Hosting 4 Agency\"},\"sameAs\":[\"https:\\\/\\\/hosting4agency.com\\\/new.hosting4agency.com\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template] - Hosting4Agency","description":"Discover everything you need to know about the WordPress WP-CLI tool, so you can make the most of it for your website.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/","og_locale":"en_US","og_type":"article","og_title":"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template] - Hosting4Agency","og_description":"Discover everything you need to know about the WordPress WP-CLI tool, so you can make the most of it for your website.","og_url":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/","og_site_name":"Hosting4Agency","article_publisher":"https:\/\/www.facebook.com\/hosting4agency","article_published_time":"2021-12-20T15:56:14+00:00","article_modified_time":"2026-06-05T22:28:52+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/hosting4agency.com\/wp-content\/uploads\/2021\/12\/Hosting-4-Agency-WPCLI.jpg","type":"image\/jpeg"}],"author":"Hosting 4 Agency","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Hosting 4 Agency","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/#article","isPartOf":{"@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/"},"author":{"name":"Hosting 4 Agency","@id":"https:\/\/hosting4agency.com\/en\/#\/schema\/person\/0973c5551c8bcc591a92709a381e1bed"},"headline":"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template]","datePublished":"2021-12-20T15:56:14+00:00","dateModified":"2026-06-05T22:28:52+00:00","mainEntityOfPage":{"@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/"},"wordCount":1309,"publisher":{"@id":"https:\/\/hosting4agency.com\/en\/#organization"},"image":{"@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/#primaryimage"},"thumbnailUrl":"https:\/\/hosting4agency.com\/wp-content\/uploads\/2021\/12\/Hosting-4-Agency-WPCLI.jpg","keywords":["Developer Tools","High-Performance Hosting","Web Development"],"articleSection":["WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/","url":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/","name":"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template] - Hosting4Agency","isPartOf":{"@id":"https:\/\/hosting4agency.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/#primaryimage"},"image":{"@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/#primaryimage"},"thumbnailUrl":"https:\/\/hosting4agency.com\/wp-content\/uploads\/2021\/12\/Hosting-4-Agency-WPCLI.jpg","datePublished":"2021-12-20T15:56:14+00:00","dateModified":"2026-06-05T22:28:52+00:00","description":"Discover everything you need to know about the WordPress WP-CLI tool, so you can make the most of it for your website.","breadcrumb":{"@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/#primaryimage","url":"https:\/\/hosting4agency.com\/wp-content\/uploads\/2021\/12\/Hosting-4-Agency-WPCLI.jpg","contentUrl":"https:\/\/hosting4agency.com\/wp-content\/uploads\/2021\/12\/Hosting-4-Agency-WPCLI.jpg","width":1200,"height":800,"caption":"wp cli commands"},{"@type":"BreadcrumbList","@id":"https:\/\/hosting4agency.com\/en\/wordpress-hosting\/wp-cli-commands-how-to-use-wordpress-cli-for-your-website-wpr-template\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hosting4agency.com\/en\/"},{"@type":"ListItem","position":2,"name":"WP-CLI Commands: how to use WordPress CLI for your website [wpr-template]"}]},{"@type":"WebSite","@id":"https:\/\/hosting4agency.com\/en\/#website","url":"https:\/\/hosting4agency.com\/en\/","name":"Hosting 4 Agency","description":"Hosting B2B2B per Agenzie","publisher":{"@id":"https:\/\/hosting4agency.com\/en\/#organization"},"alternateName":"H4A","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hosting4agency.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hosting4agency.com\/en\/#organization","name":"Hosting4Agency","url":"https:\/\/hosting4agency.com\/en\/","logo":{"@type":"ImageObject","url":"https:\/\/hosting4agency.com\/wp-content\/uploads\/2021\/08\/cropped-H4A-logo-colori-negativo.png"},"image":{"@id":"https:\/\/hosting4agency.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/elan42.com\/","https:\/\/www.linkedin.com\/company\/elan42\/"],"legalName":"E42 S.r.l.","vatID":"IT04439760275","taxID":"04439760275","telephone":"+390413034754","address":{"@type":"PostalAddress","streetAddress":"Dorsoduro 3649","addressLocality":"Venezia","postalCode":"30123","addressRegion":"VE","addressCountry":"IT"},"contactPoint":{"@type":"ContactPoint","contactType":"technical support","telephone":"+390413034754","email":"info@elan42.com"}},{"@type":"Person","@id":"https:\/\/hosting4agency.com\/en\/#\/schema\/person\/0973c5551c8bcc591a92709a381e1bed","name":"Hosting 4 Agency","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5ca6e046df97fda2d2ad39ad1d2a68842b251ad3d0d94627063cc12b7ca65579?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5ca6e046df97fda2d2ad39ad1d2a68842b251ad3d0d94627063cc12b7ca65579?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5ca6e046df97fda2d2ad39ad1d2a68842b251ad3d0d94627063cc12b7ca65579?s=96&d=mm&r=g","caption":"Hosting 4 Agency"},"sameAs":["https:\/\/hosting4agency.com\/new.hosting4agency.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/posts\/7893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/comments?post=7893"}],"version-history":[{"count":4,"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/posts\/7893\/revisions"}],"predecessor-version":[{"id":8716,"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/posts\/7893\/revisions\/8716"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/media\/2561"}],"wp:attachment":[{"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/media?parent=7893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/categories?post=7893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting4agency.com\/en\/wp-json\/wp\/v2\/tags?post=7893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}