[{"data":1,"prerenderedAt":163},["ShallowReactive",2],{"$fRB_8eNoegB6nce-HtpLcQ_9J9bNpQlODW52DqFofOl0":3,"post-tags-how-to-install-wordpress-and-essential-plugins-using-wp-cli":102},[4],{"id":5,"date":6,"date_gmt":6,"guid":7,"modified":9,"modified_gmt":9,"slug":10,"status":11,"type":12,"link":13,"title":14,"content":16,"excerpt":19,"author":21,"featured_media":22,"comment_status":23,"ping_status":23,"sticky":18,"template":24,"format":25,"meta":26,"categories":27,"tags":28,"class_list":32,"post_image_original":43,"devto_meta":44,"engagement":53,"_links":58},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-10-29T18:50:41","how-to-install-wordpress-and-essential-plugins-using-wp-cli","publish","post","https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fhow-to-install-wordpress-and-essential-plugins-using-wp-cli\u002F",{"rendered":15},"How to Install WordPress and Essential Plugins Using WP-CLI",{"rendered":17,"protected":18},"\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":20,"protected":18},"\u003Cp>Setting up a WordPress site can be time-consuming if done manually, but with WP-CLI, the process&#8230;\u003C\u002Fp>\n",1,188,"open","","standard",{"footnotes":24},[21],[29,30,31],28,18,31,[33,12,34,35,36,37,38,39,40,41,42],"post-51","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-php","tag-wordpress","tag-wpcli","https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-content\u002Fuploads\u002F2024\u002F08\u002F51-wp-cli-install.webp",{"url":45,"edited_at":46,"published_at":47,"reactions":48,"comments":49,"views":50,"reading_time":51,"body_markdown":52},"https:\u002F\u002Fdev.to\u002Faiarnob\u002Fhow-to-install-wordpress-and-essential-plugins-using-wp-cli-1bn9",null,"2024-08-10T12:41:39Z",4,0,353,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",{"claps":54,"comments":55,"views":56},{"devto":48,"site":49,"total":48},{"devto":49,"site":49,"total":49},{"devto":50,"site":51,"total":57},355,{"self":59,"collection":65,"about":68,"author":71,"replies":75,"version-history":78,"predecessor-version":81,"wp:featuredmedia":85,"wp:attachment":88,"wp:term":91,"curies":98},[60],{"href":61,"targetHints":62},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51",{"allow":63},[64],"GET",[66],{"href":67},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts",[69],{"href":70},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Ftypes\u002Fpost",[72],{"embeddable":73,"href":74},true,"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fusers\u002F1",[76],{"embeddable":73,"href":77},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fcomments?post=51",[79],{"count":21,"href":80},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51\u002Frevisions",[82],{"id":83,"href":84},110,"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts\u002F51\u002Frevisions\u002F110",[86],{"embeddable":73,"href":87},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fmedia\u002F188",[89],{"href":90},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fmedia?parent=51",[92,95],{"taxonomy":93,"embeddable":73,"href":94},"category","https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fcategories?post=51",{"taxonomy":96,"embeddable":73,"href":97},"post_tag","https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags?post=51",[99],{"name":100,"href":101,"templated":73},"wp","https:\u002F\u002Fapi.w.org\u002F{rel}",[103,124,144],{"id":29,"count":51,"description":24,"link":104,"name":105,"slug":105,"taxonomy":96,"meta":106,"_links":107},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Ftag\u002Fphp\u002F","php",[],{"self":108,"collection":113,"about":116,"wp:post_type":119,"curies":122},[109],{"href":110,"targetHints":111},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags\u002F28",{"allow":112},[64],[114],{"href":115},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags",[117],{"href":118},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Ftaxonomies\u002Fpost_tag",[120],{"href":121},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?tags=28",[123],{"name":100,"href":101,"templated":73},{"id":30,"count":125,"description":24,"link":126,"name":127,"slug":127,"taxonomy":96,"meta":128,"_links":129},8,"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Ftag\u002Fwordpress\u002F","wordpress",[],{"self":130,"collection":135,"about":137,"wp:post_type":139,"curies":142},[131],{"href":132,"targetHints":133},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags\u002F18",{"allow":134},[64],[136],{"href":115},[138],{"href":118},[140],{"href":141},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?tags=18",[143],{"name":100,"href":101,"templated":73},{"id":31,"count":21,"description":24,"link":145,"name":146,"slug":146,"taxonomy":96,"meta":147,"_links":148},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Ftag\u002Fwpcli\u002F","wpcli",[],{"self":149,"collection":154,"about":156,"wp:post_type":158,"curies":161},[150],{"href":151,"targetHints":152},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Ftags\u002F31",{"allow":153},[64],[155],{"href":115},[157],{"href":118},[159],{"href":160},"https:\u002F\u002Fwp-portfolio.aminur.tech\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts?tags=31",[162],{"name":100,"href":101,"templated":73},1794860184856]