{"id":13,"date":"2025-08-23T15:53:45","date_gmt":"2025-08-23T15:53:45","guid":{"rendered":"http:\/\/atiksnote.test\/?p=10"},"modified":"2025-08-23T15:53:45","modified_gmt":"2025-08-23T15:53:45","slug":"how-to-set-up-wp-cli-on-windows-pc-with-laragon","status":"publish","type":"post","link":"https:\/\/atiksnote.urnoit.com\/index.php\/2025\/08\/23\/how-to-set-up-wp-cli-on-windows-pc-with-laragon\/","title":{"rendered":"How to Set Up WP-CLI on Windows PC with Laragon"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WP-CLI is a command-line tool for managing WordPress websites. You can install plugins, themes, create users, and much more\u2014all without using a browser. Follow these steps to set it up on your Windows PC with Laragon.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. Check PHP Path<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Open Laragon Terminal (Menu -&gt; Terminal) and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>where php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This shows the path to your PHP. Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\laragon\\bin\\php\\php-8.1.10-Win32-vs16-x64\\php.exe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll put WP-CLI in this same folder so Windows finds it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">2. Put wp-cli.phar in PHP Folder<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Run these commands (adjust version number to your PHP folder name):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd C:\\laragon\\bin\\php\\php-8.1.10-Win32-vs16-x64\ncurl -o wp-cli.phar https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now you&#8217;ll have:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\laragon\\bin\\php\\php-8.1.10-Win32-vs16-x64\\wp-cli.phar<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-default\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3. Create wp.bat<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In the same folder (php-8.1.10-Win32-vs16-x64), create a new file named wp.bat with this content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@ECHO OFF\nphp \"C:\\laragon\\bin\\php\\php-8.1.10-Win32-vs16-x64\\wp-cli.phar\" %*<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">(\ud83d\udccc Replace the path if your PHP version folder is different)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">4. Test WP-CLI<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Close and reopen laragon Terminal, then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp --info<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should now see something like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>OS: Windows NT 10.0\nShell: cmd.exe\nPHP binary: C:\\laragon\\bin\\php\\php-8.1.10-Win32-vs16-x64\\php.exe\nWP-CLI root dir: phar:\/\/wp-cli.phar\/vendor\/wp-cli\/wp-cli\nWP-CLI version: 2.10.0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 That&#8217;s it &#8212; now wp will work from anywhere in Laragon terminal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WP-CLI is a command-line tool for managing WordPress websites. You can install plugins, themes, create users, and much more\u2014all without using a browser. Follow these steps to set it up on your Windows PC with Laragon. 1. Check PHP Path Open Laragon Terminal (Menu -&gt; Terminal) and run: This shows the path to your PHP. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":0,"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"wp:attachment":[{"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atiksnote.urnoit.com\/index.php\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}