[{"data":1,"prerenderedAt":149},["ShallowReactive",2],{"$f-Tixyl3JfixytBEJo8TkbYJ-mHPDcQsQk9t4Yz-L2Nc":3,"post-tags-how-to-install-wordpress-and-essential-plugins-using-wp-cli":88},[4],{"id":5,"date":6,"date_gmt":6,"guid":7,"modified":9,"modified_gmt":9,"slug":10,"status":11,"type":12,"link":8,"title":13,"content":15,"excerpt":18,"author":20,"featured_media":21,"comment_status":22,"ping_status":22,"sticky":17,"template":23,"format":24,"meta":25,"categories":26,"tags":27,"class_list":31,"post_image_original":41,"devto_meta":42,"_links":47},51,"2024-08-10T12:41:39",{"rendered":8},"https:\u002F\u002Fportal.pluginizelab.com\u002Fhow-to-install-wordpress-and-essential-plugins-using-wp-cli\u002F","2026-08-17T12:17:42","how-to-install-wordpress-and-essential-plugins-using-wp-cli","publish","post",{"rendered":14},"How to Install WordPress and Essential Plugins Using WP-CLI",{"rendered":16,"protected":17},"\u003Cp>Setting up a WordPress site can be time-consuming if done manually, but with \u003Ca href=\"https:\u002F\u002Fwp-cli.org\u002F#installing\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI\u003C\u002Fa>, the process becomes much faster and more efficient. In this tutorial, I&#8217;ll show you how to install WordPress along with a few essential plugins using a single command sequence.\u003C\u002Fp>\n\u003Ch3>\n  \u003Ca name=\"step-1-download-wordpress-core\" href=\"#step-1-download-wordpress-core\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 1: Download WordPress Core\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>First, you&#8217;ll need to download the WordPress core files. This command will download WordPress to a directory called \u003Ccode>mywebsite\u003C\u002Fcode>.\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp core download --path=mywebsite\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-2-create-the-configuration-file\" href=\"#step-2-create-the-configuration-file\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 2: Create the Configuration File\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Navigate into the newly created \u003Ccode>mywebsite\u003C\u002Fcode> directory, and create the \u003Ccode>wp-config.php\u003C\u002Fcode> file with your database credentials:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>cd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-3-create-the-database\" href=\"#step-3-create-the-database\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 3: Create the Database\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Now, create the database using the following command:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp db create\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-4-install-wordpress\" href=\"#step-4-install-wordpress\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 4: Install WordPress\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Install WordPress using your local URL, site title, and admin credentials:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"step-5-install-and-activate-plugins\" href=\"#step-5-install-and-activate-plugins\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  Step 5: Install and Activate Plugins\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>Finally, install and activate the necessary plugins. In this example, we&#8217;ll install WooCommerce and Dokan Lite:\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Ch3>\n  \u003Ca name=\"allinone-command-sequence\" href=\"#allinone-command-sequence\">\u003Cbr \u002F>\n  \u003C\u002Fa>\u003Cbr \u002F>\n  All-in-One Command Sequence\u003Cbr \u002F>\n\u003C\u002Fh3>\n\u003Cp>For your convenience, here’s the entire process in one continuous block of code. Just copy and paste the code below into your terminal to install WordPress and a few plugins with a single command.\n\u003C\u002Fp>\n\u003Cdiv class=\"highlight js-code-highlight\">\n\u003Cpre class=\"highlight plaintext\">\u003Ccode>wp core download --path=mywebsite\ncd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\nwp db create\nwp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\nwp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cdiv class=\"highlight__panel js-actions-panel\">\n\u003Cdiv class=\"highlight__panel-action js-fullscreen-code-action\">\n    \u003Ctitle>Enter fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003Cp>    \u003Ctitle>Exit fullscreen mode\u003C\u002Ftitle>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\u003Cp>\u003Cstrong>Prerequisite:\u003C\u002Fstrong> Install \u003Ca href=\"https:\u002F\u002Fwp-cli.org\u002F#installing\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI\u003C\u002Fa> to you machine.\u003C\u002Fp>\n",false,{"rendered":19,"protected":17},"\u003Cp>Setting up a WordPress site can be time-consuming if done manually, but with WP-CLI, the process&#8230;\u003C\u002Fp>\n",1,0,"open","","standard",{"footnotes":23},[20],[28,29,30],28,18,31,[32,12,33,34,35,36,37,38,39,40],"post-51","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-php","tag-wordpress","tag-wpcli",null,{"edited_at":41,"published_at":43,"reactions":44,"comments":21,"reading_time":45,"body_markdown":46},"2024-08-10T12:41:39Z",4,2,"Setting up a WordPress site can be time-consuming if done manually, but with [WP-CLI](https:\u002F\u002Fwp-cli.org\u002F#installing), the process becomes much faster and more efficient. In this tutorial, I'll show you how to install WordPress along with a few essential plugins using a single command sequence.\n\n### Step 1: Download WordPress Core\nFirst, you'll need to download the WordPress core files. This command will download WordPress to a directory called `mywebsite`.\n```\nwp core download --path=mywebsite\n```\n\n### Step 2: Create the Configuration File\nNavigate into the newly created `mywebsite` directory, and create the `wp-config.php` file with your database credentials:\n```\ncd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\n```\n\n### Step 3: Create the Database\nNow, create the database using the following command:\n```\nwp db create\n```\n\n### Step 4: Install WordPress\nInstall WordPress using your local URL, site title, and admin credentials:\n```\nwp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\n```\n\n### Step 5: Install and Activate Plugins\nFinally, install and activate the necessary plugins. In this example, we'll install WooCommerce and Dokan Lite:\n```\nwp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n```\n\n### All-in-One Command Sequence\nFor your convenience, here’s the entire process in one continuous block of code. Just copy and paste the code below into your terminal to install WordPress and a few plugins with a single command.\n```\nwp core download --path=mywebsite\ncd mywebsite\nwp config create --dbname=silk --dbuser=root --dbpass=root\nwp db create\nwp core install --url=mywebsite.test --title=\"Site Title\" --admin_user=admin --admin_password=admin --admin_email=mywebsite@welabs.dev\nwp plugin install woocommerce --activate\nwp plugin install dokan-lite --activate\n```\n**Prerequisite:** Install [WP-CLI](https:\u002F\u002Fwp-cli.org\u002F#installing) to you machine.\n",{"self":48,"collection":54,"about":57,"author":60,"replies":64,"version-history":67,"predecessor-version":70,"wp:attachment":74,"wp:term":77,"curies":84},[49],{"href":50,"targetHints":51},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51",{"allow":52},[53],"GET",[55],{"href":56},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts",[58],{"href":59},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftypes\u002Fpost",[61],{"embeddable":62,"href":63},true,"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fusers\u002F1",[65],{"embeddable":62,"href":66},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fcomments?post=51",[68],{"count":20,"href":69},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51\u002Frevisions",[71],{"id":72,"href":73},110,"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51\u002Frevisions\u002F110",[75],{"href":76},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fmedia?parent=51",[78,81],{"taxonomy":79,"embeddable":62,"href":80},"category","https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fcategories?post=51",{"taxonomy":82,"embeddable":62,"href":83},"post_tag","https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags?post=51",[85],{"name":86,"href":87,"templated":62},"wp","https:\u002F\u002Fapi.w.org\u002F{rel}",[89,110,130],{"id":28,"count":45,"description":23,"link":90,"name":91,"slug":91,"taxonomy":82,"meta":92,"_links":93},"https:\u002F\u002Fportal.pluginizelab.com\u002Ftag\u002Fphp\u002F","php",[],{"self":94,"collection":99,"about":102,"wp:post_type":105,"curies":108},[95],{"href":96,"targetHints":97},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags\u002F28",{"allow":98},[53],[100],{"href":101},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags",[103],{"href":104},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftaxonomies\u002Fpost_tag",[106],{"href":107},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?tags=28",[109],{"name":86,"href":87,"templated":62},{"id":29,"count":111,"description":23,"link":112,"name":113,"slug":113,"taxonomy":82,"meta":114,"_links":115},7,"https:\u002F\u002Fportal.pluginizelab.com\u002Ftag\u002Fwordpress\u002F","wordpress",[],{"self":116,"collection":121,"about":123,"wp:post_type":125,"curies":128},[117],{"href":118,"targetHints":119},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags\u002F18",{"allow":120},[53],[122],{"href":101},[124],{"href":104},[126],{"href":127},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?tags=18",[129],{"name":86,"href":87,"templated":62},{"id":30,"count":20,"description":23,"link":131,"name":132,"slug":132,"taxonomy":82,"meta":133,"_links":134},"https:\u002F\u002Fportal.pluginizelab.com\u002Ftag\u002Fwpcli\u002F","wpcli",[],{"self":135,"collection":140,"about":142,"wp:post_type":144,"curies":147},[136],{"href":137,"targetHints":138},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags\u002F31",{"allow":139},[53],[141],{"href":101},[143],{"href":104},[145],{"href":146},"https:\u002F\u002Fportal.pluginizelab.com\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?tags=31",[148],{"name":86,"href":87,"templated":62},1791053386826]