<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WP-CLI Fundamentals Archives - WP-CLI Mastery</title>
	<atom:link href="https://wpclimastery.com/blog/category/wp-cli-fundamentals/feed/" rel="self" type="application/rss+xml" />
	<link>https://wpclimastery.com/blog/category/wp-cli-fundamentals/</link>
	<description>Automate WordPress Like a DevOps Pro.</description>
	<lastBuildDate>Mon, 24 Nov 2025 11:16:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://wpclimastery.com/wp-content/uploads/2025/11/cropped-favicon-32x32.webp</url>
	<title>WP-CLI Fundamentals Archives - WP-CLI Mastery</title>
	<link>https://wpclimastery.com/blog/category/wp-cli-fundamentals/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>20 Essential WP-CLI Commands Every WordPress Developer Should Know</title>
		<link>https://wpclimastery.com/blog/20-essential-wp-cli-commands-every-wordpress-developer-should-know/</link>
		
		<dc:creator><![CDATA[Krasen]]></dc:creator>
		<pubDate>Mon, 15 Dec 2025 09:00:00 +0000</pubDate>
				<category><![CDATA[WP-CLI Fundamentals]]></category>
		<category><![CDATA[essential wpcli]]></category>
		<category><![CDATA[wordpress cli basics]]></category>
		<category><![CDATA[wordpress developer tools]]></category>
		<category><![CDATA[wp-cli cheatsheet]]></category>
		<category><![CDATA[wp-cli commands]]></category>
		<guid isPermaLink="false">https://wpclimastery.com/blog/20-essential-wp-cli-commands-every-wordpress-developer-should-know/</guid>

					<description><![CDATA[<p>Clicking through WordPress admin panels to update plugins, check site status, or manage users wastes hours every week. You know there’s a faster way, but memorizing hundreds of WP-CLI commands...</p>
<p>The post <a href="https://wpclimastery.com/blog/20-essential-wp-cli-commands-every-wordpress-developer-should-know/">20 Essential WP-CLI Commands Every WordPress Developer Should Know</a> appeared first on <a href="https://wpclimastery.com">WP-CLI Mastery</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Clicking through WordPress admin panels to update plugins, check site status, or manage users wastes hours every week. You know there’s a faster way, but memorizing hundreds of WP-CLI commands feels overwhelming.</p>



<p>WP-CLI has over 1,000 commands, but you only need about 20 to handle 90% of daily WordPress development tasks. Master these essential commands, and you’ll dramatically increase your productivity and efficiency.</p>



<p>In this guide, you’ll learn the 20 most powerful WP-CLI commands that professional WordPress developers use daily—complete with practical examples and real-world use cases.</p>



<h3 class="wp-block-heading" id="why-master-commands">Why Master Essential WP-CLI Commands?</h3>



<p><a href="https://developer.wordpress.org/cli/commands/">WP-CLI documentation</a> lists hundreds of commands, but most developers use the same core set repeatedly.</p>



<h4 class="wp-block-heading" id="problems-with-gui-wordpress-management">Problems with GUI WordPress Management</h4>



<p><strong>Repetitive clicking</strong>: Installing 10 plugins means 10 separate install-and-activate workflows.</p>



<p><strong>No batch operations</strong>: Can’t update all themes or export all user data at once.</p>



<p><strong>Time waste</strong>: Simple tasks like flushing cache require multiple page loads.</p>



<p><strong>No automation</strong>: Can’t script routine maintenance or deployment tasks.</p>



<p><strong>Context switching</strong>: Moving between terminal and browser breaks workflow.</p>



<h4 class="wp-block-heading" id="essential-commands-advantages">Essential Commands Advantages</h4>



<p><strong>Speed</strong>: Execute complex operations in seconds instead of minutes.</p>



<p><strong>Muscle memory</strong>: Same 20 commands handle most scenarios across all sites.</p>



<p><strong>Scriptable</strong>: Chain commands together for powerful automation workflows.</p>



<p><strong>SSH-ready</strong>: Manage remote servers without leaving your terminal.</p>



<p><strong>Reliable</strong>: Commands work identically across all WordPress installations.</p>



<p>According to <a href="https://wpengine.com/">WordPress developer surveys</a>, developers who use WP-CLI save an average of 5-10 hours per week on routine tasks.</p>



<h3 class="wp-block-heading" id="core-commands">Core WordPress Commands</h3>



<p>Manage WordPress core installation and configuration.</p>



<h4 class="wp-block-heading" id="check-wordpress-version">1. Check WordPress Version</h4>



<div class="sourceCode" id="cb1">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="co"># Show current WordPress version</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="ex">wp</span> core version</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="co"># Show detailed version info</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a><span class="ex">wp</span> core version --extra</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a><span class="co"># Check if core update available</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a><span class="ex">wp</span> core check-update</span></code></pre>
</div>



<p><strong>Use Case</strong>: Quickly verify WordPress version before applying updates or troubleshooting compatibility issues.</p>



<h4 class="wp-block-heading" id="update-wordpress-core">2. Update WordPress Core</h4>



<div class="sourceCode" id="cb2">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="co"># Update to latest version</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="ex">wp</span> core update</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true"></a><span class="co"># Update to specific version</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true"></a><span class="ex">wp</span> core update --version=6.4.2</span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true"></a></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true"></a><span class="co"># Preview update without installing</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true"></a><span class="ex">wp</span> core update --dry-run</span></code></pre>
</div>



<p><strong>Pro Tip</strong>: Always backup database before core updates with <code>wp db export backup.sql.gz</code>.</p>



<h4 class="wp-block-heading" id="verify-wordpress-installation">3. Verify WordPress Installation</h4>



<div class="sourceCode" id="cb3">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="co"># Check if WordPress is installed</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a><span class="ex">wp</span> core is-installed</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true"></a></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true"></a><span class="co"># Check and return exit code (useful in scripts)</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true"></a><span class="ex">wp</span> core is-installed <span class="kw">&amp;&amp;</span> <span class="bu">echo</span> <span class="st">"WordPress is installed"</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true"></a></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true"></a><span class="co"># Verify file integrity</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true"></a><span class="ex">wp</span> core verify-checksums</span></code></pre>
</div>



<p><strong>Use Case</strong>: Verify WordPress files haven’t been corrupted or tampered with during security audits.</p>



<p>Learn more in the <a href="https://developer.wordpress.org/cli/commands/core/">official WP-CLI core commands documentation</a>.</p>



<h3 class="wp-block-heading" id="plugin-commands">Plugin Management Commands</h3>



<p>Control plugins efficiently from command line.</p>



<h4 class="wp-block-heading" id="list-installed-plugins">4. List Installed Plugins</h4>



<div class="sourceCode" id="cb4">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="co"># List all plugins</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a><span class="ex">wp</span> plugin list</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true"></a><span class="co"># Show only active plugins</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true"></a><span class="ex">wp</span> plugin list --status=active</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true"></a></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true"></a><span class="co"># Export to CSV for inventory</span></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true"></a><span class="ex">wp</span> plugin list --format=csv <span class="op">&gt;</span> plugins-inventory.csv</span></code></pre>
</div>



<h4 class="wp-block-heading" id="install-and-activate-plugins">5. Install and Activate Plugins</h4>



<div class="sourceCode" id="cb5">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="co"># Install plugin</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a><span class="ex">wp</span> plugin install wordfence</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true"></a></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true"></a><span class="co"># Install and activate immediately</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true"></a><span class="ex">wp</span> plugin install contact-form-7 --activate</span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true"></a></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true"></a><span class="co"># Install multiple plugins at once</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true"></a><span class="ex">wp</span> plugin install wordfence yoast-seo autoptimize --activate</span></code></pre>
</div>



<p><strong>Use Case</strong>: Set up standard plugin stack on new WordPress installations in seconds.</p>



<h4 class="wp-block-heading" id="update-plugins">6. Update Plugins</h4>



<div class="sourceCode" id="cb6">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="co"># Update all plugins</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="ex">wp</span> plugin update --all</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true"></a><span class="co"># Update specific plugin</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true"></a><span class="ex">wp</span> plugin update wordfence</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true"></a></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true"></a><span class="co"># Preview updates without installing</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true"></a><span class="ex">wp</span> plugin update --all --dry-run</span></code></pre>
</div>



<p><strong>Pro Tip</strong>: Use <code>--dry-run</code> on production to preview which plugins need updates before applying them.</p>



<h3 class="wp-block-heading" id="theme-commands">Theme Management Commands</h3>



<p>Manage WordPress themes quickly.</p>



<h4 class="wp-block-heading" id="list-and-activate-themes">7. List and Activate Themes</h4>



<div class="sourceCode" id="cb7">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a><span class="co"># List all themes</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true"></a><span class="ex">wp</span> theme list</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true"></a></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true"></a><span class="co"># Activate theme</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true"></a><span class="ex">wp</span> theme activate twentytwentyfour</span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true"></a></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true"></a><span class="co"># Install and activate theme</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true"></a><span class="ex">wp</span> theme install astra --activate</span></code></pre>
</div>



<h4 class="wp-block-heading" id="update-themes">8. Update Themes</h4>



<div class="sourceCode" id="cb8">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a><span class="co"># Update all themes</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true"></a><span class="ex">wp</span> theme update --all</span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true"></a></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true"></a><span class="co"># Update specific theme</span></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true"></a><span class="ex">wp</span> theme update astra</span></code></pre>
</div>



<p><strong>Use Case</strong>: Keep all themes updated for security without clicking through admin panel.</p>



<h3 class="wp-block-heading" id="database-commands">Database Management Commands</h3>



<p>Handle database operations safely and efficiently.</p>



<h4 class="wp-block-heading" id="export-database">9. Export Database</h4>



<div class="sourceCode" id="cb9">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="co"># Basic database export</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a><span class="ex">wp</span> db export</span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true"></a></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true"></a><span class="co"># Export with custom filename</span></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true"></a><span class="ex">wp</span> db export backup-<span class="va">$(</span><span class="fu">date</span> +%Y%m%d<span class="va">)</span>.sql</span>
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true"></a></span>
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true"></a><span class="co"># Export with compression (recommended)</span></span>
<span id="cb9-8"><a href="#cb9-8" aria-hidden="true"></a><span class="ex">wp</span> db export backup.sql.gz</span></code></pre>
</div>



<p><strong>Critical</strong>: Export before any major changes—updates, migrations, or content modifications.</p>



<h4 class="wp-block-heading" id="import-database">10. Import Database</h4>



<div class="sourceCode" id="cb10">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="co"># Import database</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true"></a><span class="ex">wp</span> db import backup.sql</span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true"></a></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true"></a><span class="co"># Import compressed database</span></span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true"></a><span class="ex">wp</span> db import backup.sql.gz</span></code></pre>
</div>



<h4 class="wp-block-heading" id="search-and-replace-urls">11. Search and Replace URLs</h4>



<div class="sourceCode" id="cb11">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="co"># Replace URLs in database</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a><span class="ex">wp</span> search-replace <span class="st">'http://oldsite.com'</span> <span class="st">'https://newsite.com'</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true"></a></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true"></a><span class="co"># Preview changes without applying (always use first!)</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true"></a><span class="ex">wp</span> search-replace <span class="st">'old.com'</span> <span class="st">'new.com'</span> --dry-run</span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true"></a></span>
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true"></a><span class="co"># Replace with report showing all changes</span></span>
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true"></a><span class="ex">wp</span> search-replace <span class="st">'old'</span> <span class="st">'new'</span> --report --dry-run</span></code></pre>
</div>



<p><strong>Use Case</strong>: Essential for site migrations, domain changes, and HTTP to HTTPS upgrades. Learn more about <a href="https://wordpress.org/support/article/database-description/">WordPress database management</a>.</p>



<h4 class="wp-block-heading" id="optimize-database">12. Optimize Database</h4>



<div class="sourceCode" id="cb12">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a><span class="co"># Optimize all tables</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true"></a><span class="ex">wp</span> db optimize</span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true"></a></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true"></a><span class="co"># Check database for errors</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true"></a><span class="ex">wp</span> db check</span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true"></a></span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true"></a><span class="co"># Repair corrupted tables</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true"></a><span class="ex">wp</span> db repair</span></code></pre>
</div>



<h3 class="wp-block-heading" id="user-commands">User Management Commands</h3>



<p>Create and manage WordPress users from terminal.</p>



<h4 class="wp-block-heading" id="list-users">13. List Users</h4>



<div class="sourceCode" id="cb13">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="co"># List all users</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true"></a><span class="ex">wp</span> user list</span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true"></a></span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true"></a><span class="co"># Show only administrators</span></span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true"></a><span class="ex">wp</span> user list --role=administrator</span>
<span id="cb13-6"><a href="#cb13-6" aria-hidden="true"></a></span>
<span id="cb13-7"><a href="#cb13-7" aria-hidden="true"></a><span class="co"># Export users to CSV</span></span>
<span id="cb13-8"><a href="#cb13-8" aria-hidden="true"></a><span class="ex">wp</span> user list --format=csv <span class="op">&gt;</span> users.csv</span></code></pre>
</div>



<h4 class="wp-block-heading" id="create-users">14. Create Users</h4>



<div class="sourceCode" id="cb14">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true"></a><span class="co"># Create user (prompts for password)</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true"></a><span class="ex">wp</span> user create johndoe john@example.com</span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true"></a></span>
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true"></a><span class="co"># Create with specific role</span></span>
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true"></a><span class="ex">wp</span> user create editor1 editor@example.com --role=editor</span>
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true"></a></span>
<span id="cb14-7"><a href="#cb14-7" aria-hidden="true"></a><span class="co"># Create and send password via email</span></span>
<span id="cb14-8"><a href="#cb14-8" aria-hidden="true"></a><span class="ex">wp</span> user create newuser user@example.com --send-email</span></code></pre>
</div>



<p><strong>Use Case</strong>: Quickly onboard new team members or clients without using WordPress admin.</p>



<h4 class="wp-block-heading" id="reset-user-password">15. Reset User Password</h4>



<div class="sourceCode" id="cb15">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true"></a><span class="co"># Reset password (sends email)</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true"></a><span class="ex">wp</span> user reset-password admin</span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true"></a></span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true"></a><span class="co"># Set specific password</span></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true"></a><span class="ex">wp</span> user update admin --user_pass=NewSecureP@ssw0rd123</span></code></pre>
</div>



<h3 class="wp-block-heading" id="content-commands">Content Management Commands</h3>



<p>Manage posts, pages, and content efficiently.</p>



<h4 class="wp-block-heading" id="list-posts">16. List Posts</h4>



<div class="sourceCode" id="cb16">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a><span class="co"># List all posts</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true"></a><span class="ex">wp</span> post list</span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true"></a></span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true"></a><span class="co"># Show only published posts</span></span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true"></a><span class="ex">wp</span> post list --post_status=publish</span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true"></a></span>
<span id="cb16-7"><a href="#cb16-7" aria-hidden="true"></a><span class="co"># Filter by category</span></span>
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true"></a><span class="ex">wp</span> post list --category_name=tutorials</span>
<span id="cb16-9"><a href="#cb16-9" aria-hidden="true"></a></span>
<span id="cb16-10"><a href="#cb16-10" aria-hidden="true"></a><span class="co"># Count total posts</span></span>
<span id="cb16-11"><a href="#cb16-11" aria-hidden="true"></a><span class="ex">wp</span> post list --format=count</span></code></pre>
</div>



<h4 class="wp-block-heading" id="create-and-update-posts">17. Create and Update Posts</h4>



<div class="sourceCode" id="cb17">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true"></a><span class="co"># Create post</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true"></a><span class="ex">wp</span> post create --post_title=<span class="st">"New Post"</span> --post_status=publish</span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true"></a></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true"></a><span class="co"># Create with content</span></span>
<span id="cb17-5"><a href="#cb17-5" aria-hidden="true"></a><span class="ex">wp</span> post create --post_title=<span class="st">"Hello"</span> --post_content=<span class="st">"Post content here"</span> --post_status=publish</span>
<span id="cb17-6"><a href="#cb17-6" aria-hidden="true"></a></span>
<span id="cb17-7"><a href="#cb17-7" aria-hidden="true"></a><span class="co"># Update post</span></span>
<span id="cb17-8"><a href="#cb17-8" aria-hidden="true"></a><span class="ex">wp</span> post update 123 --post_title=<span class="st">"Updated Title"</span></span></code></pre>
</div>



<p><strong>Use Case</strong>: Bulk create test content for development environments or automate content publishing.</p>



<h3 class="wp-block-heading" id="cache-commands">Cache and Maintenance Commands</h3>



<p>Keep WordPress running smoothly with maintenance commands.</p>



<h4 class="wp-block-heading" id="flush-cache-and-permalinks">18. Flush Cache and Permalinks</h4>



<div class="sourceCode" id="cb18">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true"></a><span class="co"># Flush object cache</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true"></a><span class="ex">wp</span> cache flush</span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true"></a></span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true"></a><span class="co"># Flush rewrite rules (permalinks)</span></span>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true"></a><span class="ex">wp</span> rewrite flush</span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true"></a></span>
<span id="cb18-7"><a href="#cb18-7" aria-hidden="true"></a><span class="co"># Combined flush for troubleshooting</span></span>
<span id="cb18-8"><a href="#cb18-8" aria-hidden="true"></a><span class="ex">wp</span> cache flush <span class="kw">&amp;&amp;</span> <span class="ex">wp</span> rewrite flush</span></code></pre>
</div>



<p><strong>Use Case</strong>: First step in troubleshooting 404 errors or stale content issues.</p>



<h4 class="wp-block-heading" id="clean-transients">19. Clean Transients</h4>



<div class="sourceCode" id="cb19">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true"></a><span class="co"># Delete expired transients</span></span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true"></a><span class="ex">wp</span> transient delete --expired</span>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true"></a></span>
<span id="cb19-4"><a href="#cb19-4" aria-hidden="true"></a><span class="co"># Delete all transients (safe, they regenerate)</span></span>
<span id="cb19-5"><a href="#cb19-5" aria-hidden="true"></a><span class="ex">wp</span> transient delete --all</span>
<span id="cb19-6"><a href="#cb19-6" aria-hidden="true"></a></span>
<span id="cb19-7"><a href="#cb19-7" aria-hidden="true"></a><span class="co"># List all transients</span></span>
<span id="cb19-8"><a href="#cb19-8" aria-hidden="true"></a><span class="ex">wp</span> transient list</span></code></pre>
</div>



<p><strong>Pro Tip</strong>: Deleting expired transients can reduce database size by 10-30% on older sites.</p>



<h3 class="wp-block-heading" id="config-commands">Configuration and Options Commands</h3>



<p>Manage WordPress configuration and options.</p>



<h4 class="wp-block-heading" id="manage-options">20. Manage Options</h4>



<div class="sourceCode" id="cb20">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true"></a><span class="co"># Get option value</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true"></a><span class="ex">wp</span> option get siteurl</span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true"></a></span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true"></a><span class="co"># Update option</span></span>
<span id="cb20-5"><a href="#cb20-5" aria-hidden="true"></a><span class="ex">wp</span> option update blogdescription <span class="st">"My awesome site"</span></span>
<span id="cb20-6"><a href="#cb20-6" aria-hidden="true"></a></span>
<span id="cb20-7"><a href="#cb20-7" aria-hidden="true"></a><span class="co"># List all options (warning: very long output)</span></span>
<span id="cb20-8"><a href="#cb20-8" aria-hidden="true"></a><span class="ex">wp</span> option list</span>
<span id="cb20-9"><a href="#cb20-9" aria-hidden="true"></a></span>
<span id="cb20-10"><a href="#cb20-10" aria-hidden="true"></a><span class="co"># Add new option</span></span>
<span id="cb20-11"><a href="#cb20-11" aria-hidden="true"></a><span class="ex">wp</span> option add custom_setting <span class="st">"custom value"</span></span></code></pre>
</div>



<p><strong>Use Case</strong>: Quickly change site URL, title, or custom plugin settings without database queries.</p>



<h3 class="wp-block-heading" id="command-combinations">Command Combinations for Power Users</h3>



<p>Chain essential commands for powerful workflows.</p>



<h4 class="wp-block-heading" id="quick-site-setup">Quick Site Setup</h4>



<div class="sourceCode" id="cb21">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true"></a><span class="co"># Install WordPress, plugins, and configure</span></span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true"></a><span class="ex">wp</span> core download</span>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true"></a><span class="ex">wp</span> config create --dbname=wordpress --dbuser=root --dbpass=password</span>
<span id="cb21-4"><a href="#cb21-4" aria-hidden="true"></a><span class="ex">wp</span> core install --url=example.com --title=<span class="st">"My Site"</span> --admin_user=admin --admin_email=admin@example.com</span>
<span id="cb21-5"><a href="#cb21-5" aria-hidden="true"></a><span class="ex">wp</span> plugin install wordfence contact-form-7 yoast-seo --activate</span>
<span id="cb21-6"><a href="#cb21-6" aria-hidden="true"></a><span class="ex">wp</span> theme install astra --activate</span></code></pre>
</div>



<h4 class="wp-block-heading" id="complete-site-backup">Complete Site Backup</h4>



<div class="sourceCode" id="cb22">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true"></a><span class="co"># Backup database and files</span></span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true"></a><span class="va">DATE=$(</span><span class="fu">date</span> +%Y%m%d<span class="va">)</span></span>
<span id="cb22-3"><a href="#cb22-3" aria-hidden="true"></a><span class="ex">wp</span> db export backup-<span class="va">$DATE</span>.sql.gz</span>
<span id="cb22-4"><a href="#cb22-4" aria-hidden="true"></a><span class="fu">tar</span> -czf files-backup-<span class="va">$DATE</span>.tar.gz wp-content/</span>
<span id="cb22-5"><a href="#cb22-5" aria-hidden="true"></a><span class="bu">echo</span> <span class="st">"Backup complete: backup-</span><span class="va">$DATE</span><span class="st">.sql.gz + files-backup-</span><span class="va">$DATE</span><span class="st">.tar.gz"</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="site-health-check">Site Health Check</h4>



<div class="sourceCode" id="cb23">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true"></a><span class="co"># Check core, verify files, update everything</span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true"></a><span class="ex">wp</span> core version</span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true"></a><span class="ex">wp</span> core verify-checksums</span>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true"></a><span class="ex">wp</span> plugin update --all --dry-run</span>
<span id="cb23-5"><a href="#cb23-5" aria-hidden="true"></a><span class="ex">wp</span> theme update --all --dry-run</span>
<span id="cb23-6"><a href="#cb23-6" aria-hidden="true"></a><span class="ex">wp</span> db check</span></code></pre>
</div>



<h3 class="wp-block-heading" id="next-steps">Next Steps</h3>



<p>You now have the 20 essential WP-CLI commands that cover 90% of daily WordPress development tasks.</p>



<h4 class="wp-block-heading" id="recommended-learning-path">Recommended Learning Path</h4>



<p><strong>Week 1</strong>: Practice core commands</p>



<ul class="wp-block-list">
<li>Install/update WordPress core</li>



<li>Manage plugins and themes</li>



<li>Basic database exports</li>
</ul>



<p><strong>Week 2</strong>: User and content management</p>



<ul class="wp-block-list">
<li>Create and manage users</li>



<li>Bulk content operations</li>



<li>Search-replace operations</li>
</ul>



<p><strong>Week 3</strong>: Automation basics</p>



<ul class="wp-block-list">
<li>Chain commands together</li>



<li>Create simple backup scripts</li>



<li>Automate routine maintenance</li>
</ul>



<p><strong>Week 4</strong>: Advanced workflows</p>



<ul class="wp-block-list">
<li>Build deployment scripts</li>



<li>Implement automated testing</li>



<li>Create custom commands</li>
</ul>



<h4 class="wp-block-heading" id="advanced-topics">Advanced Topics</h4>



<ol class="wp-block-list">
<li><strong><a href="#">WP-CLI Configuration Files</a></strong> &#8211; Customize WP-CLI behavior</li>



<li><strong><a href="#">WP-CLI Packages</a></strong> &#8211; Extend functionality with community packages</li>



<li><strong><a href="#">Custom WP-CLI Commands</a></strong> &#8211; Build your own commands</li>
</ol>



<h4 class="wp-block-heading" id="get-more-resources">Get More Resources</h4>



<p><strong><a href="#">Download WP-CLI command cheatsheet</a></strong> &#8211; Quick reference for all 20 commands</p>



<p><strong><a href="/#get-started">Join our email course</a></strong> for:</p>



<ul class="wp-block-list">
<li>Weekly WP-CLI tutorials</li>



<li>Advanced automation techniques</li>



<li>Real-world case studies</li>
</ul>



<h3 class="wp-block-heading" id="conclusion">Conclusion</h3>



<p>These 20 essential WP-CLI commands form the foundation of efficient WordPress development. You don’t need to memorize hundreds of commands—just master these core operations.</p>



<p>What we covered:</p>



<p>✅ Core WordPress management (version, update, verify) <br>✅ Plugin and theme operations (install, update, activate) <br>✅ Database commands (export, import, search-replace, optimize) <br>✅ User management (create, list, password reset) <br>✅ Content operations (list, create, update posts) <br>✅ Maintenance commands (cache flush, transients, options)</p>



<p>Start using these commands daily, and within two weeks they’ll become second nature. Your productivity will skyrocket, and you’ll wonder how you ever managed WordPress without them.</p>



<p><strong>Ready to level up?</strong> Learn <a href="#">WP-CLI automation with bash scripts</a> or <a href="#">advanced database operations</a>.</p>



<p><strong>Questions about essential WP-CLI commands?</strong> Drop a comment below!</p>



<p><strong>Found this helpful?</strong> Share with other WordPress developers.</p>



<p></p>
<p>The post <a href="https://wpclimastery.com/blog/20-essential-wp-cli-commands-every-wordpress-developer-should-know/">20 Essential WP-CLI Commands Every WordPress Developer Should Know</a> appeared first on <a href="https://wpclimastery.com">WP-CLI Mastery</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WP-CLI Config Files: Best Practices and Advanced Configuration (2025)</title>
		<link>https://wpclimastery.com/blog/wp-cli-config-files-best-practices-and-advanced-configuration-2025/</link>
					<comments>https://wpclimastery.com/blog/wp-cli-config-files-best-practices-and-advanced-configuration-2025/#respond</comments>
		
		<dc:creator><![CDATA[Krasen]]></dc:creator>
		<pubDate>Sat, 15 Nov 2025 09:00:00 +0000</pubDate>
				<category><![CDATA[WP-CLI Fundamentals]]></category>
		<category><![CDATA[wordpress cli setup]]></category>
		<category><![CDATA[wp-cli config]]></category>
		<category><![CDATA[wp-cli.yml]]></category>
		<category><![CDATA[wpcli best practices]]></category>
		<category><![CDATA[wpcli configuration]]></category>
		<guid isPermaLink="false">https://wpclimastery.com/?p=166</guid>

					<description><![CDATA[<p>Typing the same WP-CLI flags repeatedly wastes time—--path=/var/www/html, --allow-root, --quiet on every command. Managing different configurations for development, staging, and production environments becomes tedious and error-prone. WP-CLI config files automate...</p>
<p>The post <a href="https://wpclimastery.com/blog/wp-cli-config-files-best-practices-and-advanced-configuration-2025/">WP-CLI Config Files: Best Practices and Advanced Configuration (2025)</a> appeared first on <a href="https://wpclimastery.com">WP-CLI Mastery</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Typing the same WP-CLI flags repeatedly wastes time—<code>--path=/var/www/html</code>, <code>--allow-root</code>, <code>--quiet</code> on every command. Managing different configurations for development, staging, and production environments becomes tedious and error-prone.</p>



<p>WP-CLI config files automate command options, set project defaults, create custom aliases, and configure environment-specific settings. One <code>wp-cli.yml</code> file eliminates repetitive typing and standardizes WP-CLI behavior across your team.</p>



<p>In this guide, you’ll learn WP-CLI config file best practices, from basic setup to advanced configurations used by professional WordPress development teams managing multiple environments.</p>



<h3 class="wp-block-heading" id="why-config-files">Why Use WP-CLI Config Files?</h3>



<p><a href="https://make.wordpress.org/cli/handbook/references/config/">WP-CLI configuration</a> simplifies command execution and ensures consistency across environments.</p>



<h4 class="wp-block-heading" id="problems-without-config-files">Problems Without Config Files</h4>



<p><strong>Repetitive flags</strong>: Typing <code>--path</code>, <code>--url</code>, <code>--allow-root</code> on every command.</p>



<p><strong>Environment inconsistency</strong>: Different settings on dev, staging, and production.</p>



<p><strong>Team confusion</strong>: Each developer uses different WP-CLI settings.</p>



<p><strong>Command complexity</strong>: Long commands with multiple flags are error-prone.</p>



<p><strong>No standardization</strong>: Can’t enforce best practices across projects.</p>



<h4 class="wp-block-heading" id="wp-cli-config-file-advantages">WP-CLI Config File Advantages</h4>



<p><strong>DRY principle</strong>: Configure once, use everywhere.</p>



<p><strong>Environment-aware</strong>: Different configs for dev, staging, production.</p>



<p><strong>Team consistency</strong>: Everyone uses same WP-CLI settings.</p>



<p><strong>Shorter commands</strong>: <code>wp plugin list</code> instead of <code>wp plugin list --path=/var/www/html --allow-root</code>.</p>



<p><strong>Version controlled</strong>: Config files tracked in Git ensure reproducibility.</p>



<p>According to <a href="https://make.wordpress.org/cli/handbook/">WP-CLI documentation</a>, config files are essential for professional WordPress workflows.</p>



<h3 class="wp-block-heading" id="basics">WP-CLI Config File Basics</h3>



<p>Understand WP-CLI config file locations and structure.</p>



<h4 class="wp-block-heading" id="config-file-locations">Config File Locations</h4>



<p>WP-CLI searches for config files in this order:</p>



<div class="sourceCode" id="cb1">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="co"># 1. Current directory and parents (project-specific)</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="ex">./wp-cli.yml</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><span class="ex">../wp-cli.yml</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="ex">../../wp-cli.yml</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><span class="co"># 2. User's home directory (global defaults)</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a><span class="ex">~/.wp-cli/config.yml</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a><span class="co"># 3. System-wide config (rarely used)</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true"></a><span class="ex">/etc/wp-cli/config.yml</span></span></code></pre>
</div>



<p><strong>Priority</strong>: Project-specific configs override global configs.</p>



<h4 class="wp-block-heading" id="basic-wp-cli.yml-structure">Basic wp-cli.yml Structure</h4>



<div class="sourceCode" id="cb2">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="co"># wp-cli.yml - Basic configuration</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a><span class="co"># WordPress installation path</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true"></a><span class="fu">path</span><span class="kw">:</span><span class="at"> /var/www/html</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true"></a></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true"></a><span class="co"># Allow root user (for servers)</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true"></a><span class="fu">allow-root</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true"></a></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true"></a><span class="co"># Site URL</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true"></a><span class="fu">url</span><span class="kw">:</span><span class="at"> https://example.com</span></span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true"></a></span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true"></a><span class="co"># Disable colorized output</span></span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true"></a><span class="fu">color</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true"></a></span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true"></a><span class="co"># Quiet mode (suppress informational messages)</span></span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true"></a><span class="fu">quiet</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true"></a></span>
<span id="cb2-18"><a href="#cb2-18" aria-hidden="true"></a><span class="co"># Debug mode</span></span>
<span id="cb2-19"><a href="#cb2-19" aria-hidden="true"></a><span class="fu">debug</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span></code></pre>
</div>



<p>Place in your WordPress root directory:</p>



<div class="sourceCode" id="cb3">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="bu">cd</span> /var/www/html</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a><span class="fu">nano</span> wp-cli.yml</span></code></pre>
</div>



<h4 class="wp-block-heading" id="test-config-file">Test Config File</h4>



<div class="sourceCode" id="cb4">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="co"># Show current config</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a><span class="ex">wp</span> cli info</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true"></a><span class="co"># Show which config files are loaded</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true"></a><span class="ex">wp</span> cli info <span class="kw">|</span> <span class="fu">grep</span> <span class="st">"WP-CLI config"</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true"></a></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true"></a><span class="co"># Test path setting</span></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true"></a><span class="ex">wp</span> option get siteurl</span></code></pre>
</div>



<p>Learn more in the <a href="https://make.wordpress.org/cli/handbook/references/config/">WP-CLI config documentation</a>.</p>



<h3 class="wp-block-heading" id="project-config">Project-Specific Configuration</h3>



<p>Configure WP-CLI for individual WordPress projects.</p>



<h4 class="wp-block-heading" id="complete-project-config">Complete Project Config</h4>



<div class="sourceCode" id="cb5">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="co"># wp-cli.yml - Complete project configuration</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true"></a><span class="co"># Core settings</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true"></a><span class="fu">path</span><span class="kw">:</span><span class="at"> wp</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true"></a><span class="fu">url</span><span class="kw">:</span><span class="at"> https://example.com</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true"></a><span class="fu">allow-root</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true"></a></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true"></a><span class="co"># Output settings</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true"></a><span class="fu">color</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true"></a><span class="fu">quiet</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true"></a><span class="fu">debug</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true"></a></span>
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true"></a><span class="co"># Command aliases</span></span>
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true"></a><span class="fu">@staging</span><span class="kw">:</span></span>
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true"></a><span class="at">  </span><span class="fu">ssh</span><span class="kw">:</span><span class="at"> user@staging-server.com/var/www/staging</span></span>
<span id="cb5-16"><a href="#cb5-16" aria-hidden="true"></a></span>
<span id="cb5-17"><a href="#cb5-17" aria-hidden="true"></a><span class="fu">@production</span><span class="kw">:</span></span>
<span id="cb5-18"><a href="#cb5-18" aria-hidden="true"></a><span class="at">  </span><span class="fu">ssh</span><span class="kw">:</span><span class="at"> user@prod-server.com/var/www/production</span></span>
<span id="cb5-19"><a href="#cb5-19" aria-hidden="true"></a></span>
<span id="cb5-20"><a href="#cb5-20" aria-hidden="true"></a><span class="co"># Default parameters for commands</span></span>
<span id="cb5-21"><a href="#cb5-21" aria-hidden="true"></a><span class="fu">plugin list</span><span class="kw">:</span></span>
<span id="cb5-22"><a href="#cb5-22" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --format=table</span></span>
<span id="cb5-23"><a href="#cb5-23" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --fields=name,status,version,update</span></span>
<span id="cb5-24"><a href="#cb5-24" aria-hidden="true"></a></span>
<span id="cb5-25"><a href="#cb5-25" aria-hidden="true"></a><span class="fu">theme list</span><span class="kw">:</span></span>
<span id="cb5-26"><a href="#cb5-26" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --format=table</span></span>
<span id="cb5-27"><a href="#cb5-27" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --fields=name,status,version</span></span>
<span id="cb5-28"><a href="#cb5-28" aria-hidden="true"></a></span>
<span id="cb5-29"><a href="#cb5-29" aria-hidden="true"></a><span class="fu">post list</span><span class="kw">:</span></span>
<span id="cb5-30"><a href="#cb5-30" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --post_type=post</span></span>
<span id="cb5-31"><a href="#cb5-31" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --orderby=date</span></span>
<span id="cb5-32"><a href="#cb5-32" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --order=DESC</span></span>
<span id="cb5-33"><a href="#cb5-33" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --posts_per_page=20</span></span>
<span id="cb5-34"><a href="#cb5-34" aria-hidden="true"></a></span>
<span id="cb5-35"><a href="#cb5-35" aria-hidden="true"></a><span class="co"># Require specific WP-CLI version</span></span>
<span id="cb5-36"><a href="#cb5-36" aria-hidden="true"></a><span class="fu">require</span><span class="kw">:</span></span>
<span id="cb5-37"><a href="#cb5-37" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> </span><span class="fu">wp-cli/wp-cli</span><span class="kw">:</span><span class="at"> ^2.9</span></span>
<span id="cb5-38"><a href="#cb5-38" aria-hidden="true"></a></span>
<span id="cb5-39"><a href="#cb5-39" aria-hidden="true"></a><span class="co"># Custom PHP binary</span></span>
<span id="cb5-40"><a href="#cb5-40" aria-hidden="true"></a><span class="fu">php</span><span class="kw">:</span><span class="at"> /usr/bin/php8.1</span></span>
<span id="cb5-41"><a href="#cb5-41" aria-hidden="true"></a></span>
<span id="cb5-42"><a href="#cb5-42" aria-hidden="true"></a><span class="co"># Apache modules (for server info)</span></span>
<span id="cb5-43"><a href="#cb5-43" aria-hidden="true"></a><span class="fu">apache_modules</span><span class="kw">:</span></span>
<span id="cb5-44"><a href="#cb5-44" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> mod_rewrite</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="wordpress-in-subdirectory">WordPress in Subdirectory</h4>



<div class="sourceCode" id="cb6">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="co"># When WordPress is in a subdirectory</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a><span class="fu">path</span><span class="kw">:</span><span class="at"> public/wp</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true"></a></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true"></a><span class="co"># or</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true"></a><span class="fu">path</span><span class="kw">:</span><span class="at"> wordpress</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true"></a></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true"></a><span class="co"># or</span></span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true"></a><span class="fu">path</span><span class="kw">:</span><span class="at"> htdocs/wordpress</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="custom-database-configuration">Custom Database Configuration</h4>



<div class="sourceCode" id="cb7">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a><span class="co"># Override database settings (for testing)</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true"></a></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true"></a><span class="fu">dbname</span><span class="kw">:</span><span class="at"> test_database</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true"></a><span class="fu">dbuser</span><span class="kw">:</span><span class="at"> test_user</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true"></a><span class="fu">dbpass</span><span class="kw">:</span><span class="at"> test_password</span></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true"></a><span class="fu">dbhost</span><span class="kw">:</span><span class="at"> localhost</span></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true"></a></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true"></a><span class="co"># Use custom table prefix</span></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true"></a><span class="fu">dbprefix</span><span class="kw">:</span><span class="at"> custom_</span></span></code></pre>
</div>



<h3 class="wp-block-heading" id="global-config">Global User Configuration</h3>



<p>Set default WP-CLI behavior for all projects.</p>



<h4 class="wp-block-heading" id="create-global-config">Create Global Config</h4>



<div class="sourceCode" id="cb8">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a><span class="co"># Create config directory</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true"></a><span class="fu">mkdir</span> -p ~/.wp-cli</span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true"></a></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true"></a><span class="co"># Create global config file</span></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true"></a><span class="fu">nano</span> ~/.wp-cli/config.yml</span></code></pre>
</div>



<h4 class="wp-block-heading" id="global-config-template">Global Config Template</h4>



<div class="sourceCode" id="cb9">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="co"># ~/.wp-cli/config.yml - Global defaults</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true"></a><span class="co"># Always allow root (useful for servers)</span></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true"></a><span class="fu">allow-root</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true"></a></span>
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true"></a><span class="co"># Color output enabled</span></span>
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true"></a><span class="fu">color</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb9-8"><a href="#cb9-8" aria-hidden="true"></a></span>
<span id="cb9-9"><a href="#cb9-9" aria-hidden="true"></a><span class="co"># Show errors</span></span>
<span id="cb9-10"><a href="#cb9-10" aria-hidden="true"></a><span class="fu">debug</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb9-11"><a href="#cb9-11" aria-hidden="true"></a><span class="fu">quiet</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb9-12"><a href="#cb9-12" aria-hidden="true"></a></span>
<span id="cb9-13"><a href="#cb9-13" aria-hidden="true"></a><span class="co"># Custom command aliases (available everywhere)</span></span>
<span id="cb9-14"><a href="#cb9-14" aria-hidden="true"></a><span class="fu">alias</span><span class="kw">:</span></span>
<span id="cb9-15"><a href="#cb9-15" aria-hidden="true"></a><span class="at">  </span><span class="fu">ll</span><span class="kw">:</span><span class="at"> plugin list --status=active</span></span>
<span id="cb9-16"><a href="#cb9-16" aria-hidden="true"></a><span class="at">  </span><span class="fu">tl</span><span class="kw">:</span><span class="at"> theme list --status=active</span></span>
<span id="cb9-17"><a href="#cb9-17" aria-hidden="true"></a><span class="at">  </span><span class="fu">flushall</span><span class="kw">:</span><span class="at"> cache flush &amp;&amp; rewrite flush</span></span>
<span id="cb9-18"><a href="#cb9-18" aria-hidden="true"></a><span class="at">  </span><span class="fu">quickbackup</span><span class="kw">:</span><span class="at"> db export backup-$(date +%Y%m%d).sql.gz</span></span>
<span id="cb9-19"><a href="#cb9-19" aria-hidden="true"></a></span>
<span id="cb9-20"><a href="#cb9-20" aria-hidden="true"></a><span class="co"># Default formats</span></span>
<span id="cb9-21"><a href="#cb9-21" aria-hidden="true"></a><span class="fu">plugin list</span><span class="kw">:</span></span>
<span id="cb9-22"><a href="#cb9-22" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --format=table</span></span>
<span id="cb9-23"><a href="#cb9-23" aria-hidden="true"></a></span>
<span id="cb9-24"><a href="#cb9-24" aria-hidden="true"></a><span class="co"># Disable auto-check for updates</span></span>
<span id="cb9-25"><a href="#cb9-25" aria-hidden="true"></a><span class="fu">disable_auto_check_update</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb9-26"><a href="#cb9-26" aria-hidden="true"></a></span>
<span id="cb9-27"><a href="#cb9-27" aria-hidden="true"></a><span class="co"># Custom package path</span></span>
<span id="cb9-28"><a href="#cb9-28" aria-hidden="true"></a><span class="fu">packages_dir</span><span class="kw">:</span><span class="at"> ~/.wp-cli/packages/</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="personal-aliases">Personal Aliases</h4>



<div class="sourceCode" id="cb10">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="co"># Useful custom aliases in global config</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true"></a></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true"></a><span class="fu">alias</span><span class="kw">:</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true"></a><span class="co">  # Quick commands</span></span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true"></a><span class="at">  </span><span class="fu">status</span><span class="kw">:</span><span class="at"> core is-installed &amp;&amp; db check</span></span>
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true"></a><span class="at">  </span><span class="fu">info</span><span class="kw">:</span><span class="at"> core version &amp;&amp; option get siteurl</span></span>
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true"></a></span>
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true"></a><span class="co">  # Maintenance shortcuts</span></span>
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true"></a><span class="at">  </span><span class="fu">mm-on</span><span class="kw">:</span><span class="at"> maintenance-mode activate</span></span>
<span id="cb10-10"><a href="#cb10-10" aria-hidden="true"></a><span class="at">  </span><span class="fu">mm-off</span><span class="kw">:</span><span class="at"> maintenance-mode deactivate</span></span>
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true"></a></span>
<span id="cb10-12"><a href="#cb10-12" aria-hidden="true"></a><span class="co">  # Cleanup operations</span></span>
<span id="cb10-13"><a href="#cb10-13" aria-hidden="true"></a><span class="fu">  cleanup</span><span class="kw">: </span><span class="ch">|</span></span>
<span id="cb10-14"><a href="#cb10-14" aria-hidden="true"></a>    post delete $(post list --post_status=trash --format=ids) --force</span>
<span id="cb10-15"><a href="#cb10-15" aria-hidden="true"></a>    transient delete --expired</span>
<span id="cb10-16"><a href="#cb10-16" aria-hidden="true"></a>    cache flush</span>
<span id="cb10-17"><a href="#cb10-17" aria-hidden="true"></a></span>
<span id="cb10-18"><a href="#cb10-18" aria-hidden="true"></a><span class="co">  # Security checks</span></span>
<span id="cb10-19"><a href="#cb10-19" aria-hidden="true"></a><span class="fu">  security</span><span class="kw">: </span><span class="ch">|</span></span>
<span id="cb10-20"><a href="#cb10-20" aria-hidden="true"></a>    core verify-checksums</span>
<span id="cb10-21"><a href="#cb10-21" aria-hidden="true"></a>    plugin verify-checksums --all</span>
<span id="cb10-22"><a href="#cb10-22" aria-hidden="true"></a></span>
<span id="cb10-23"><a href="#cb10-23" aria-hidden="true"></a><span class="co">  # Quick site backup</span></span>
<span id="cb10-24"><a href="#cb10-24" aria-hidden="true"></a><span class="fu">  backup</span><span class="kw">: </span><span class="ch">|</span></span>
<span id="cb10-25"><a href="#cb10-25" aria-hidden="true"></a>    db export backups/db-$(date +%Y%m%d-%H%M%S).sql.gz</span>
<span id="cb10-26"><a href="#cb10-26" aria-hidden="true"></a>    echo "Backup complete"</span></code></pre>
</div>



<h3 class="wp-block-heading" id="environment-configs">Environment-Specific Configs</h3>



<p>Different configurations for development, staging, and production.</p>



<h4 class="wp-block-heading" id="multi-environment-setup">Multi-Environment Setup</h4>



<div class="sourceCode" id="cb11">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="co"># Project structure with environment configs</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a><span class="ex">/var/www/</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true"></a>├── <span class="ex">wp-cli.yml</span>              # Base config</span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true"></a>├── <span class="ex">wp-cli.local.yml</span>        # Development overrides</span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true"></a>├── <span class="ex">wp-cli.staging.yml</span>      # Staging overrides</span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true"></a>└── <span class="ex">wp-cli.production.yml</span>   # Production overrides</span></code></pre>
</div>



<h4 class="wp-block-heading" id="base-config-wp-cli.yml">Base Config (wp-cli.yml)</h4>



<div class="sourceCode" id="cb12">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a><span class="co"># wp-cli.yml - Shared across all environments</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true"></a></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true"></a><span class="fu">path</span><span class="kw">:</span><span class="at"> public</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true"></a><span class="fu">color</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true"></a></span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true"></a><span class="co"># Commands available in all environments</span></span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true"></a><span class="fu">alias</span><span class="kw">:</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true"></a><span class="at">  </span><span class="fu">status</span><span class="kw">:</span><span class="at"> core is-installed &amp;&amp; db check</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="development-config-wp-cli.local.yml">Development Config (wp-cli.local.yml)</h4>



<div class="sourceCode" id="cb13">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="co"># wp-cli.local.yml - Development settings</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true"></a></span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true"></a><span class="fu">url</span><span class="kw">:</span><span class="at"> http://localhost:8080</span></span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true"></a><span class="fu">debug</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true"></a><span class="fu">allow-root</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb13-6"><a href="#cb13-6" aria-hidden="true"></a></span>
<span id="cb13-7"><a href="#cb13-7" aria-hidden="true"></a><span class="co"># Enable all error output</span></span>
<span id="cb13-8"><a href="#cb13-8" aria-hidden="true"></a><span class="fu">WP_DEBUG</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb13-9"><a href="#cb13-9" aria-hidden="true"></a><span class="fu">WP_DEBUG_LOG</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb13-10"><a href="#cb13-10" aria-hidden="true"></a><span class="fu">WP_DEBUG_DISPLAY</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb13-11"><a href="#cb13-11" aria-hidden="true"></a></span>
<span id="cb13-12"><a href="#cb13-12" aria-hidden="true"></a><span class="co"># Development-specific aliases</span></span>
<span id="cb13-13"><a href="#cb13-13" aria-hidden="true"></a><span class="fu">alias</span><span class="kw">:</span></span>
<span id="cb13-14"><a href="#cb13-14" aria-hidden="true"></a><span class="at">  </span><span class="fu">seed</span><span class="kw">:</span><span class="at"> scaffold post-content --count=50</span></span>
<span id="cb13-15"><a href="#cb13-15" aria-hidden="true"></a><span class="at">  </span><span class="fu">reset-db</span><span class="kw">:</span><span class="at"> db reset --yes &amp;&amp; core install --url=http://localhost:8080 --title="Dev Site" --admin_user=admin --admin_email=dev@example.test</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="production-config-wp-cli.production.yml">Production Config (wp-cli.production.yml)</h4>



<div class="sourceCode" id="cb14">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true"></a><span class="co"># wp-cli.production.yml - Production settings</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true"></a></span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true"></a><span class="fu">url</span><span class="kw">:</span><span class="at"> https://example.com</span></span>
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true"></a><span class="fu">debug</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true"></a><span class="fu">quiet</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span>
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true"></a><span class="fu">allow-root</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb14-7"><a href="#cb14-7" aria-hidden="true"></a></span>
<span id="cb14-8"><a href="#cb14-8" aria-hidden="true"></a><span class="co"># Disable dangerous commands</span></span>
<span id="cb14-9"><a href="#cb14-9" aria-hidden="true"></a><span class="fu">disabled_commands</span><span class="kw">:</span></span>
<span id="cb14-10"><a href="#cb14-10" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> db drop</span></span>
<span id="cb14-11"><a href="#cb14-11" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> db reset</span></span>
<span id="cb14-12"><a href="#cb14-12" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> scaffold</span></span>
<span id="cb14-13"><a href="#cb14-13" aria-hidden="true"></a></span>
<span id="cb14-14"><a href="#cb14-14" aria-hidden="true"></a><span class="co"># Production-safe aliases</span></span>
<span id="cb14-15"><a href="#cb14-15" aria-hidden="true"></a><span class="fu">alias</span><span class="kw">:</span></span>
<span id="cb14-16"><a href="#cb14-16" aria-hidden="true"></a><span class="fu">  deploy</span><span class="kw">: </span><span class="ch">|</span></span>
<span id="cb14-17"><a href="#cb14-17" aria-hidden="true"></a>    maintenance-mode activate</span>
<span id="cb14-18"><a href="#cb14-18" aria-hidden="true"></a>    plugin update --all</span>
<span id="cb14-19"><a href="#cb14-19" aria-hidden="true"></a>    theme update --all</span>
<span id="cb14-20"><a href="#cb14-20" aria-hidden="true"></a>    core update</span>
<span id="cb14-21"><a href="#cb14-21" aria-hidden="true"></a>    cache flush</span>
<span id="cb14-22"><a href="#cb14-22" aria-hidden="true"></a>    rewrite flush</span>
<span id="cb14-23"><a href="#cb14-23" aria-hidden="true"></a>    maintenance-mode deactivate</span></code></pre>
</div>



<h4 class="wp-block-heading" id="use-environment-configs">Use Environment Configs</h4>



<div class="sourceCode" id="cb15">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true"></a><span class="co"># Load specific config with --config flag</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true"></a><span class="ex">wp</span> --config=wp-cli.local.yml plugin list</span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true"></a><span class="ex">wp</span> --config=wp-cli.production.yml core update</span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true"></a></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true"></a><span class="co"># Or use WP_CLI_CONFIG_PATH environment variable</span></span>
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true"></a><span class="bu">export</span> <span class="va">WP_CLI_CONFIG_PATH=</span>wp-cli.staging.yml</span>
<span id="cb15-7"><a href="#cb15-7" aria-hidden="true"></a><span class="ex">wp</span> plugin list</span></code></pre>
</div>



<p>Learn about <a href="https://wordpress.org/support/article/installing-wordpress-locally/">WordPress environments</a> best practices.</p>



<h3 class="wp-block-heading" id="advanced-options">Advanced Configuration Options</h3>



<p>Professional config features for complex workflows.</p>



<h4 class="wp-block-heading" id="ssh-remote-execution">SSH Remote Execution</h4>



<div class="sourceCode" id="cb16">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a><span class="co"># Execute commands on remote servers</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true"></a></span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true"></a><span class="fu">@staging</span><span class="kw">:</span></span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true"></a><span class="at">  </span><span class="fu">ssh</span><span class="kw">:</span><span class="at"> user@staging.example.com/var/www/staging</span></span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true"></a><span class="at">  </span><span class="fu">path</span><span class="kw">:</span><span class="at"> /var/www/staging</span></span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true"></a></span>
<span id="cb16-7"><a href="#cb16-7" aria-hidden="true"></a><span class="fu">@production</span><span class="kw">:</span></span>
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true"></a><span class="at">  </span><span class="fu">ssh</span><span class="kw">:</span><span class="at"> user@prod.example.com/var/www/production</span></span>
<span id="cb16-9"><a href="#cb16-9" aria-hidden="true"></a><span class="at">  </span><span class="fu">path</span><span class="kw">:</span><span class="at"> /var/www/production</span></span>
<span id="cb16-10"><a href="#cb16-10" aria-hidden="true"></a></span>
<span id="cb16-11"><a href="#cb16-11" aria-hidden="true"></a><span class="co"># Usage:</span></span>
<span id="cb16-12"><a href="#cb16-12" aria-hidden="true"></a><span class="co"># wp @staging plugin list</span></span>
<span id="cb16-13"><a href="#cb16-13" aria-hidden="true"></a><span class="co"># wp @production core update</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="http-basic-auth">HTTP Basic Auth</h4>



<div class="sourceCode" id="cb17">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true"></a><span class="co"># For sites behind HTTP authentication</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true"></a></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true"></a><span class="fu">http</span><span class="kw">:</span></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true"></a><span class="at">  </span><span class="fu">user</span><span class="kw">:</span><span class="at"> admin</span></span>
<span id="cb17-5"><a href="#cb17-5" aria-hidden="true"></a><span class="at">  </span><span class="fu">password</span><span class="kw">:</span><span class="at"> secretpassword</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="custom-php-binary">Custom PHP Binary</h4>



<div class="sourceCode" id="cb18">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true"></a><span class="co"># Use specific PHP version</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true"></a></span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true"></a><span class="fu">php</span><span class="kw">:</span><span class="at"> /usr/bin/php8.1</span></span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true"></a></span>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true"></a><span class="co"># or with full path</span></span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true"></a><span class="fu">php_bin</span><span class="kw">:</span><span class="at"> /opt/php/8.1/bin/php</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="require-specific-packages">Require Specific Packages</h4>



<div class="sourceCode" id="cb19">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true"></a><span class="co"># Ensure WP-CLI packages are installed</span></span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true"></a></span>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true"></a><span class="fu">require</span><span class="kw">:</span></span>
<span id="cb19-4"><a href="#cb19-4" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> wp-cli/doctor-command</span></span>
<span id="cb19-5"><a href="#cb19-5" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> wp-cli/profile-command</span></span>
<span id="cb19-6"><a href="#cb19-6" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> aaemnnosttv/wp-cli-login-command</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="disable-commands">Disable Commands</h4>



<div class="sourceCode" id="cb20">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true"></a><span class="co"># Prevent dangerous commands on production</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true"></a></span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true"></a><span class="fu">disabled_commands</span><span class="kw">:</span></span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> db drop</span></span>
<span id="cb20-5"><a href="#cb20-5" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> db reset</span></span>
<span id="cb20-6"><a href="#cb20-6" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> site delete</span></span>
<span id="cb20-7"><a href="#cb20-7" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> scaffold</span></span></code></pre>
</div>



<h3 class="wp-block-heading" id="command-defaults">Command-Specific Defaults</h3>



<p>Set default options for frequently used commands.</p>



<h4 class="wp-block-heading" id="plugin-command-defaults">Plugin Command Defaults</h4>



<div class="sourceCode" id="cb21">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true"></a><span class="fu">plugin install</span><span class="kw">:</span></span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --activate</span></span>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true"></a></span>
<span id="cb21-4"><a href="#cb21-4" aria-hidden="true"></a><span class="fu">plugin list</span><span class="kw">:</span></span>
<span id="cb21-5"><a href="#cb21-5" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --format=table</span></span>
<span id="cb21-6"><a href="#cb21-6" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --fields=name,status,version,update</span></span>
<span id="cb21-7"><a href="#cb21-7" aria-hidden="true"></a></span>
<span id="cb21-8"><a href="#cb21-8" aria-hidden="true"></a><span class="fu">plugin update</span><span class="kw">:</span></span>
<span id="cb21-9"><a href="#cb21-9" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --dry-run</span><span class="co"> # Always preview first</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="database-defaults">Database Defaults</h4>



<div class="sourceCode" id="cb22">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true"></a><span class="fu">db export</span><span class="kw">:</span></span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --add-drop-table</span></span>
<span id="cb22-3"><a href="#cb22-3" aria-hidden="true"></a></span>
<span id="cb22-4"><a href="#cb22-4" aria-hidden="true"></a><span class="fu">db import</span><span class="kw">:</span></span>
<span id="cb22-5"><a href="#cb22-5" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --skip-optimization</span></span>
<span id="cb22-6"><a href="#cb22-6" aria-hidden="true"></a></span>
<span id="cb22-7"><a href="#cb22-7" aria-hidden="true"></a><span class="fu">search-replace</span><span class="kw">:</span></span>
<span id="cb22-8"><a href="#cb22-8" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --dry-run</span></span>
<span id="cb22-9"><a href="#cb22-9" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --report</span></span>
<span id="cb22-10"><a href="#cb22-10" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --precise</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="post-defaults">Post Defaults</h4>



<div class="sourceCode" id="cb23">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true"></a><span class="fu">post list</span><span class="kw">:</span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --post_type=post</span></span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --orderby=date</span></span>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --order=DESC</span></span>
<span id="cb23-5"><a href="#cb23-5" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --posts_per_page=25</span></span>
<span id="cb23-6"><a href="#cb23-6" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --fields=ID,post_title,post_status,post_date</span></span>
<span id="cb23-7"><a href="#cb23-7" aria-hidden="true"></a></span>
<span id="cb23-8"><a href="#cb23-8" aria-hidden="true"></a><span class="fu">post create</span><span class="kw">:</span></span>
<span id="cb23-9"><a href="#cb23-9" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --post_status=draft</span></span>
<span id="cb23-10"><a href="#cb23-10" aria-hidden="true"></a><span class="at">  </span><span class="kw">-</span><span class="at"> --post_author=1</span></span></code></pre>
</div>



<h3 class="wp-block-heading" id="security-team">Security and Team Configs</h3>



<p>Secure configs for team collaboration.</p>



<h4 class="wp-block-heading" id="secrets-in-environment-variables">Secrets in Environment Variables</h4>



<div class="sourceCode" id="cb24">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true"></a><span class="co"># Don't hardcode credentials in config files!</span></span>
<span id="cb24-2"><a href="#cb24-2" aria-hidden="true"></a></span>
<span id="cb24-3"><a href="#cb24-3" aria-hidden="true"></a><span class="co"># WRONG (insecure)</span></span>
<span id="cb24-4"><a href="#cb24-4" aria-hidden="true"></a><span class="fu">http</span><span class="kw">:</span></span>
<span id="cb24-5"><a href="#cb24-5" aria-hidden="true"></a><span class="at">  </span><span class="fu">user</span><span class="kw">:</span><span class="at"> admin</span></span>
<span id="cb24-6"><a href="#cb24-6" aria-hidden="true"></a><span class="at">  </span><span class="fu">password</span><span class="kw">:</span><span class="at"> secretpassword</span></span>
<span id="cb24-7"><a href="#cb24-7" aria-hidden="true"></a></span>
<span id="cb24-8"><a href="#cb24-8" aria-hidden="true"></a><span class="co"># RIGHT (use environment variables)</span></span>
<span id="cb24-9"><a href="#cb24-9" aria-hidden="true"></a><span class="fu">http</span><span class="kw">:</span></span>
<span id="cb24-10"><a href="#cb24-10" aria-hidden="true"></a><span class="at">  </span><span class="fu">user</span><span class="kw">:</span><span class="at"> ${WP_CLI_HTTP_USER}</span></span>
<span id="cb24-11"><a href="#cb24-11" aria-hidden="true"></a><span class="at">  </span><span class="fu">password</span><span class="kw">:</span><span class="at"> ${WP_CLI_HTTP_PASSWORD}</span></span></code></pre>
</div>



<p>Set in shell:</p>



<div class="sourceCode" id="cb25">
<pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true"></a><span class="bu">export</span> <span class="va">WP_CLI_HTTP_USER=</span><span class="st">"admin"</span></span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true"></a><span class="bu">export</span> <span class="va">WP_CLI_HTTP_PASSWORD=</span><span class="st">"secretpassword"</span></span></code></pre>
</div>



<h4 class="wp-block-heading" id="gitignore-for-config-files">.gitignore for Config Files</h4>



<pre class="wp-block-code"><code># .gitignore

# Ignore local overrides
wp-cli.local.yml
wp-cli.*.local.yml

# Ignore configs with secrets
wp-cli.secrets.yml

# Keep base configs
!wp-cli.yml
!wp-cli.example.yml</code></pre>



<h4 class="wp-block-heading" id="team-config-template">Team Config Template</h4>



<div class="sourceCode" id="cb27">
<pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true"></a><span class="co"># wp-cli.example.yml - Template for team</span></span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true"></a></span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true"></a><span class="fu">path</span><span class="kw">:</span><span class="at"> public</span></span>
<span id="cb27-4"><a href="#cb27-4" aria-hidden="true"></a><span class="fu">url</span><span class="kw">:</span><span class="at"> REPLACE_WITH_YOUR_URL</span></span>
<span id="cb27-5"><a href="#cb27-5" aria-hidden="true"></a><span class="fu">allow-root</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb27-6"><a href="#cb27-6" aria-hidden="true"></a><span class="co"># Copy this to wp-cli.local.yml and customize</span></span>
<span id="cb27-7"><a href="#cb27-7" aria-hidden="true"></a><span class="co"># cp wp-cli.example.yml wp-cli.local.yml</span></span></code></pre>
</div>



<h3 class="wp-block-heading" id="next-steps">Next Steps</h3>



<p>You now have comprehensive WP-CLI config file knowledge for professional workflows.</p>



<h4 class="wp-block-heading" id="recommended-learning-path">Recommended Learning Path</h4>



<p><strong>Week 1</strong>: Basic configs</p>



<ul class="wp-block-list">
<li>Create project wp-cli.yml</li>



<li>Set up global config</li>



<li>Test common settings</li>
</ul>



<p><strong>Week 2</strong>: Environment configs</p>



<ul class="wp-block-list">
<li>Create dev/staging/prod configs</li>



<li>Set up SSH aliases</li>



<li>Test environment switching</li>
</ul>



<p><strong>Week 3</strong>: Advanced features</p>



<ul class="wp-block-list">
<li>Custom command defaults</li>



<li>Team configurations</li>



<li>Security best practices</li>
</ul>



<p><strong>Week 4</strong>: Optimization</p>



<ul class="wp-block-list">
<li>Refine configs for workflow</li>



<li>Document team standards</li>



<li>Share configs via Git</li>
</ul>



<h4 class="wp-block-heading" id="advanced-topics">Advanced Topics</h4>



<ol class="wp-block-list">
<li><strong><a href="#">WP-CLI Package Development</a></strong> &#8211; Build custom commands</li>



<li><strong><a href="#">WP-CLI in CI/CD</a></strong> &#8211; Automated testing configs</li>



<li><strong><a href="#">Multi-Site Configs</a></strong> &#8211; Network-wide settings</li>
</ol>



<h4 class="wp-block-heading" id="get-more-resources">Get More Resources</h4>



<p><strong><a href="#">Download config templates</a></strong> including:</p>



<ul class="wp-block-list">
<li>Project config examples</li>



<li>Environment-specific configs</li>



<li>Team collaboration templates</li>
</ul>



<p><strong><a href="/#get-started">Join our email course</a></strong> for:</p>



<ul class="wp-block-list">
<li>Weekly WP-CLI tutorials</li>



<li>Configuration best practices</li>



<li>Workflow optimization tips</li>
</ul>



<h3 class="wp-block-heading" id="conclusion">Conclusion</h3>



<p>WP-CLI config files transform repetitive command-line work into streamlined, consistent workflows that save time and prevent errors across your entire team.</p>



<p>What we covered:</p>



<p>✅ Config file locations and search order <br>✅ Project-specific and global configurations <br>✅ Environment-specific setups (dev/staging/prod) <br>✅ Advanced options (SSH, custom defaults, aliases) <br>✅ Command-specific defaults and optimizations <br>✅ Security and team collaboration practices</p>



<p>Master these configurations, and you’ll never type redundant WP-CLI flags again—just clean, efficient commands that work consistently everywhere.</p>



<p><strong>Ready for more?</strong> Learn <a href="#">WP-CLI aliases and shortcuts</a> or <a href="#">custom command development</a>.</p>



<p><strong>Questions about WP-CLI config files?</strong> Drop a comment below!</p>



<p><strong>Found this helpful?</strong> Share with other WordPress developers.</p>
<p>The post <a href="https://wpclimastery.com/blog/wp-cli-config-files-best-practices-and-advanced-configuration-2025/">WP-CLI Config Files: Best Practices and Advanced Configuration (2025)</a> appeared first on <a href="https://wpclimastery.com">WP-CLI Mastery</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wpclimastery.com/blog/wp-cli-config-files-best-practices-and-advanced-configuration-2025/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install and Configure WP-CLI on Ubuntu/Debian (2025 Complete Guide)</title>
		<link>https://wpclimastery.com/blog/how-to-install-and-configure-wp-cli-on-ubuntu-debian-2025-complete-guide/</link>
					<comments>https://wpclimastery.com/blog/how-to-install-and-configure-wp-cli-on-ubuntu-debian-2025-complete-guide/#respond</comments>
		
		<dc:creator><![CDATA[Krasen]]></dc:creator>
		<pubDate>Wed, 05 Nov 2025 09:00:00 +0000</pubDate>
				<category><![CDATA[WP-CLI Fundamentals]]></category>
		<category><![CDATA[debian wordpress]]></category>
		<category><![CDATA[linux wordpress cli]]></category>
		<category><![CDATA[ubuntu wpcli]]></category>
		<category><![CDATA[wp-cli installation]]></category>
		<category><![CDATA[wp-cli setup]]></category>
		<guid isPermaLink="false">https://wpclimastery.com/how-to-install-and-configure-wp-cli-on-ubuntu-debian-2025-complete-guide/</guid>

					<description><![CDATA[<p>WP-CLI is the official command-line interface for WordPress that lets you manage your WordPress installations without using a web browser. If you&#8217;re managing multiple WordPress sites or want to automate...</p>
<p>The post <a href="https://wpclimastery.com/blog/how-to-install-and-configure-wp-cli-on-ubuntu-debian-2025-complete-guide/">How to Install and Configure WP-CLI on Ubuntu/Debian (2025 Complete Guide)</a> appeared first on <a href="https://wpclimastery.com">WP-CLI Mastery</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>WP-CLI is the official command-line interface for WordPress that lets you manage your WordPress installations without using a web browser. If you&#8217;re managing multiple WordPress sites or want to automate repetitive tasks, WP-CLI is an absolute game-changer.</p>



<p>In this comprehensive guide, you&#8217;ll learn how to install and configure WP-CLI on Ubuntu and Debian Linux systems from scratch. Whether you&#8217;re a beginner or experienced developer, this step-by-step tutorial will have you up and running in less than 10 minutes.</p>



<h3 class="wp-block-heading" id="what-is-wp-cli-and-why-use-it-what-is-wp-cli">What is WP-CLI and Why Use It?</h3>



<p><a href="https://wp-cli.org/">WP-CLI</a>&nbsp;is a powerful command-line tool for managing WordPress installations. Instead of clicking through the WordPress admin panel, you can execute commands directly from your terminal.</p>



<h4 class="wp-block-heading" id="key-benefits-of-wp-cli">Key Benefits of WP-CLI</h4>



<p><strong>Time Savings</strong>: Update all plugins across 50 sites with one command instead of logging into each site manually.</p>



<p><strong>Automation</strong>: Schedule backups, updates, and maintenance tasks with cron jobs.</p>



<p><strong>Bulk Operations</strong>: Perform actions on hundreds of posts, users, or sites simultaneously.</p>



<p><strong>Remote Management</strong>: Manage WordPress sites via SSH without needing FTP or admin panel access.</p>



<p><strong>DevOps Integration</strong>: Integrate WordPress into your CI/CD pipelines and deployment scripts.</p>



<h4 class="wp-block-heading" id="real-world-use-cases">Real-World Use Cases</h4>



<ul class="wp-block-list">
<li>Update all WordPress core, plugins, and themes across 100+ sites in minutes</li>



<li>Import/export databases during migrations</li>



<li>Generate test content for development environments</li>



<li>Automate WordPress installation and configuration</li>



<li>Search and replace URLs after moving sites</li>



<li>Manage WordPress Multisite networks efficiently</li>
</ul>



<p>According to&nbsp;<a href="https://wordpress.org/about/stats/">WordPress.org</a>, over 43% of all websites use WordPress. If you manage even 2-3 WordPress sites, WP-CLI will save you hours every week.</p>



<h3 class="wp-block-heading" id="prerequisites-prerequisites">Prerequisites</h3>



<p>Before installing WP-CLI, ensure your system meets these requirements:</p>



<h4 class="wp-block-heading" id="system-requirements">System Requirements</h4>



<ul class="wp-block-list">
<li><strong>Operating System</strong>: Ubuntu 18.04+ or Debian 9+ (this guide focuses on these distributions)</li>



<li><strong>PHP</strong>: Version 7.4 or higher (WordPress 6.0+ requirement)</li>



<li><strong>SSH Access</strong>: Terminal access to your server</li>



<li><strong>WordPress</strong>: An existing WordPress installation (or plan to install one)</li>



<li><strong>Root/Sudo Access</strong>: Permission to install system packages</li>
</ul>



<h4 class="wp-block-heading" id="check-your-php-version">Check Your PHP Version</h4>



<p>First, verify you have PHP installed and check the version:</p>



<pre class="wp-block-code"><code>php -v
</code></pre>



<p>You should see output like:</p>



<pre class="wp-block-code"><code>PHP 8.1.2 (cli) (built: Jan 15 2025 10:30:45)
Copyright (c) The PHP Group
Zend Engine v4.1.2
</code></pre>



<p>If PHP is not installed or the version is below 7.4, install or update it:</p>



<pre class="wp-block-code"><code><em># Ubuntu/Debian</em>
sudo apt update
sudo apt install php-cli php-mbstring php-xml php-mysql -y
</code></pre>



<p>The&nbsp;<code>php-cli</code>,&nbsp;<code>php-mbstring</code>, and&nbsp;<code>php-xml</code>&nbsp;extensions are required for WP-CLI to function properly.</p>



<h4 class="wp-block-heading" id="check-for-existing-wordpress-installation-optional">Check for Existing WordPress Installation (Optional)</h4>



<p>If you already have WordPress installed, note the installation path. Common locations:</p>



<ul class="wp-block-list">
<li><code>/var/www/html</code></li>



<li><code>/var/www/yourdomain.com/public_html</code></li>



<li><code>/home/username/public_html</code></li>
</ul>



<p>You&#8217;ll need this path to run WP-CLI commands later.</p>



<h3 class="wp-block-heading" id="installing-wp-cli-on-ubuntudebian-installation">Installing WP-CLI on Ubuntu/Debian</h3>



<p>There are several methods to install WP-CLI. We&#8217;ll use the official recommended method: downloading the Phar (PHP Archive) file.</p>



<h4 class="wp-block-heading" id="step-1-download-wp-cli">Step 1: Download WP-CLI</h4>



<p>Download the latest WP-CLI Phar file using&nbsp;<code>curl</code>:</p>



<pre class="wp-block-code"><code>curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
</code></pre>



<p><strong>Alternative</strong>: If you don&#8217;t have&nbsp;<code>curl</code>&nbsp;installed, use&nbsp;<code>wget</code>:</p>



<pre class="wp-block-code"><code>wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
</code></pre>



<p>This downloads&nbsp;<code>wp-cli.phar</code>&nbsp;to your current directory.</p>



<h4 class="wp-block-heading" id="step-2-verify-the-phar-file-works">Step 2: Verify the Phar File Works</h4>



<p>Before installation, test that the Phar file is working:</p>



<pre class="wp-block-code"><code>php wp-cli.phar --info
</code></pre>



<p>You should see output showing WP-CLI information:</p>



<pre class="wp-block-code"><code>OS:     Linux 5.15.0-58-generic #64-Ubuntu SMP x86_64
Shell:  /bin/bash
PHP binary:    /usr/bin/php8.1
PHP version:   8.1.2
php.ini used:  /etc/php/8.1/cli/php.ini
MySQL binary:  /usr/bin/mysql
MySQL version: mysql  Ver 8.0.31-0ubuntu0.22.04.1
</code></pre>



<p>If you see this output, WP-CLI is working correctly.</p>



<h4 class="wp-block-heading" id="step-3-make-the-file-executable">Step 3: Make the File Executable</h4>



<p>Add executable permissions to the Phar file:</p>



<pre class="wp-block-code"><code>chmod +x wp-cli.phar
</code></pre>



<h4 class="wp-block-heading" id="step-4-move-to-system-path">Step 4: Move to System Path</h4>



<p>Move the Phar file to a directory in your system PATH so you can run it from anywhere:</p>



<pre class="wp-block-code"><code>sudo mv wp-cli.phar /usr/local/bin/wp
</code></pre>



<p>Now you can run WP-CLI using the&nbsp;<code>wp</code>&nbsp;command instead of&nbsp;<code>php wp-cli.phar</code>.</p>



<h4 class="wp-block-heading" id="step-5-verify-installation">Step 5: Verify Installation</h4>



<p>Confirm WP-CLI is installed correctly:</p>



<pre class="wp-block-code"><code>wp --info
</code></pre>



<p>If you see the WP-CLI information output, congratulations! WP-CLI is successfully installed.</p>



<p><strong>Expected output:</strong></p>



<pre class="wp-block-code"><code>OS:     Linux 5.15.0-58-generic #64-Ubuntu SMP x86_64
Shell:  /bin/bash
PHP binary:    /usr/bin/php8.1
PHP version:   8.1.2
WP-CLI version: 2.9.0
</code></pre>



<h3 class="wp-block-heading" id="verifying-your-installation-verification">Verifying Your Installation</h3>



<p>Let&#8217;s run a few basic commands to ensure everything works properly.</p>



<h4 class="wp-block-heading" id="check-wp-cli-version">Check WP-CLI Version</h4>



<pre class="wp-block-code"><code>wp cli version
</code></pre>



<p><strong>Output:</strong></p>



<pre class="wp-block-code"><code>WP-CLI 2.9.0
</code></pre>



<h4 class="wp-block-heading" id="get-help">Get Help</h4>



<p>View available WP-CLI commands:</p>



<pre class="wp-block-code"><code>wp help
</code></pre>



<p>This displays a comprehensive list of all WP-CLI commands organized by category.</p>



<h4 class="wp-block-heading" id="test-with-a-wordpress-installation">Test with a WordPress Installation</h4>



<p>If you have WordPress installed, navigate to your WordPress directory and check the installation:</p>



<pre class="wp-block-code"><code>cd /var/www/html
wp core version
</code></pre>



<p><strong>Output:</strong></p>



<pre class="wp-block-code"><code>6.4.2
</code></pre>



<p>This confirms WP-CLI can successfully communicate with your WordPress installation.</p>



<p><strong>Common Issue</strong>: If you get &#8220;Error: This does not seem to be a WordPress installation,&#8221; you&#8217;re either not in a WordPress directory or the path is incorrect. Make sure you&#8217;re in the root WordPress directory containing&nbsp;<code>wp-config.php</code>.</p>



<h3 class="wp-block-heading" id="configuring-wp-cli-configuration">Configuring WP-CLI</h3>



<p>WP-CLI can be configured globally or per-project using configuration files. This allows you to set default parameters and customize behavior.</p>



<h4 class="wp-block-heading" id="global-configuration-file">Global Configuration File</h4>



<p>Create a global config file in your home directory:</p>



<pre class="wp-block-code"><code>mkdir -p ~/.wp-cli
nano ~/.wp-cli/config.yml
</code></pre>



<p>Add basic configuration:</p>



<pre class="wp-block-code"><code><em># ~/.wp-cli/config.yml</em>

<em># Disable color output (useful for logs)</em>
color: true

<em># Set default user for commands that require one</em>
user: admin

<em># Quiet mode (suppress informational messages)</em>
quiet: false

<em># Path to WordPress installation (optional, useful if you manage one main site)</em>
path: /var/www/html

<em># Apache/Nginx modules directory</em>
apache_modules: /usr/lib/apache2/modules
</code></pre>



<p>Save and exit (<code>CTRL+X</code>, then&nbsp;<code>Y</code>, then&nbsp;<code>Enter</code>&nbsp;in nano).</p>



<h4 class="wp-block-heading" id="project-specific-configuration">Project-Specific Configuration</h4>



<p>For project-specific settings, create a&nbsp;<code>wp-cli.yml</code>&nbsp;file in your WordPress root directory:</p>



<pre class="wp-block-code"><code>cd /var/www/html
nano wp-cli.yml
</code></pre>



<p>Add project-specific configuration:</p>



<pre class="wp-block-code"><code><em># /var/www/html/wp-cli.yml</em>

<em># Specify the WordPress path (useful for non-standard structures)</em>
path: wp

<em># Disable email sending during commands</em>
<em># (prevents notification emails during bulk operations)</em>
skip-plugins:
  - disable-emails

<em># Set default user for content operations</em>
user: editor

<em># URL of the WordPress site (for proper link generation)</em>
url: https://yourdomain.com
</code></pre>



<p><strong>Important</strong>: The project-specific&nbsp;<code>wp-cli.yml</code>&nbsp;takes precedence over the global&nbsp;<code>~/.wp-cli/config.yml</code>&nbsp;file.</p>



<h4 class="wp-block-heading" id="useful-configuration-options">Useful Configuration Options</h4>



<p>Here are some additional configuration options you might find useful:</p>



<pre class="wp-block-code"><code><em># Require confirmation for destructive operations</em>
require:
  - confirmation

<em># Set custom command directory for your own commands</em>
require:
  - /path/to/custom-commands.php

<em># HTTP request timeout (default: 30 seconds)</em>
http-timeout: 60

<em># Set debug mode</em>
debug: false
</code></pre>



<p>Learn more about configuration in the&nbsp;<a href="https://make.wordpress.org/cli/handbook/references/config/">official WP-CLI config documentation</a>.</p>



<h3 class="wp-block-heading" id="setting-up-command-aliases-aliases">Setting Up Command Aliases</h3>



<p>WP-CLI aliases let you create shortcuts for frequently-used commands, making your workflow more efficient.</p>



<h4 class="wp-block-heading" id="creating-bash-aliases">Creating Bash Aliases</h4>



<p>Add these to your&nbsp;<code>~/.bashrc</code>&nbsp;or&nbsp;<code>~/.bash_aliases</code>&nbsp;file:</p>



<pre class="wp-block-code"><code>nano ~/.bashrc
</code></pre>



<p>Add these useful aliases at the end of the file:</p>



<pre class="wp-block-code"><code><em># WP-CLI Aliases</em>
alias wpcli='wp'
alias wpv='wp core version'
alias wpu='wp core update'
alias wppu='wp plugin update --all'
alias wptu='wp theme update --all'
alias wpdb='wp db export'
alias wpsearch='wp search-replace'
alias wpflush='wp cache flush'
alias wplist='wp plugin list'
</code></pre>



<p>Save and reload your bash configuration:</p>



<pre class="wp-block-code"><code>source ~/.bashrc
</code></pre>



<p>Now you can use shortcuts like:</p>



<pre class="wp-block-code"><code>wpv          <em># Check WordPress version</em>
wppu         <em># Update all plugins</em>
wpflush      <em># Clear cache</em>
</code></pre>



<h4 class="wp-block-heading" id="wp-cli-native-aliases">WP-CLI Native Aliases</h4>



<p>WP-CLI also supports its own alias system for remote sites. Edit your config file:</p>



<pre class="wp-block-code"><code>nano ~/.wp-cli/config.yml
</code></pre>



<p>Add site aliases:</p>



<pre class="wp-block-code"><code><em># ~/.wp-cli/config.yml</em>

<em># Define site aliases</em>
@production:
  ssh: user@production-server.com/var/www/html

@staging:
  ssh: user@staging-server.com/var/www/staging

@local:
  path: /var/www/html
</code></pre>



<p>Now you can run commands on remote sites:</p>



<pre class="wp-block-code"><code><em># Update plugins on production</em>
wp @production plugin update --all

<em># Export database from staging</em>
wp @staging db export

<em># Check version on local</em>
wp @local core version
</code></pre>



<p>This is incredibly powerful for managing multiple WordPress installations. Read more about&nbsp;<a href="https://make.wordpress.org/cli/handbook/references/aliases/">WP-CLI aliases in the official handbook</a>.</p>



<h3 class="wp-block-heading" id="updating-wp-cli-updating">Updating WP-CLI</h3>



<p>WP-CLI should be updated regularly to get new features, bug fixes, and security patches.</p>



<h4 class="wp-block-heading" id="check-for-updates">Check for Updates</h4>



<pre class="wp-block-code"><code>wp cli check-update
</code></pre>



<h4 class="wp-block-heading" id="update-to-latest-stable-version">Update to Latest Stable Version</h4>



<pre class="wp-block-code"><code>wp cli update
</code></pre>



<h4 class="wp-block-heading" id="update-to-nightly-build-unstable">Update to Nightly Build (Unstable)</h4>



<p>For testing or if you need bleeding-edge features:</p>



<pre class="wp-block-code"><code>wp cli update --nightly
</code></pre>



<p><strong>Warning</strong>: The nightly build may be unstable. Only use it for development/testing environments.</p>



<h4 class="wp-block-heading" id="verify-new-version">Verify New Version</h4>



<p>After updating, confirm the new version:</p>



<pre class="wp-block-code"><code>wp cli version
</code></pre>



<h4 class="wp-block-heading" id="update-frequency">Update Frequency</h4>



<ul class="wp-block-list">
<li><strong>Production servers</strong>: Update monthly or when security patches are released</li>



<li><strong>Development/staging</strong>: Update whenever a new stable version is available</li>



<li><strong>Check release notes</strong>: Review&nbsp;<a href="https://github.com/wp-cli/wp-cli/releases">WP-CLI GitHub releases</a>&nbsp;before updating production</li>
</ul>



<h3 class="wp-block-heading" id="troubleshooting-common-issues-troubleshooting">Troubleshooting Common Issues</h3>



<h4 class="wp-block-heading" id="issue-1-wp-command-not-found">Issue 1: &#8220;wp: command not found&#8221;</h4>



<p><strong>Problem</strong>: After installation, running&nbsp;<code>wp</code>&nbsp;returns &#8220;command not found.&#8221;</p>



<p><strong>Solutions</strong>:</p>



<ol class="wp-block-list">
<li>Verify the file is in your PATH:</li>
</ol>



<pre class="wp-block-code"><code>which wp
</code></pre>



<ol start="2" class="wp-block-list">
<li>If nothing is returned, the file might not be in&nbsp;<code>/usr/local/bin</code>. Check if that directory is in your PATH:</li>
</ol>



<pre class="wp-block-code"><code>echo $PATH
</code></pre>



<ol start="3" class="wp-block-list">
<li>If&nbsp;<code>/usr/local/bin</code>&nbsp;isn&#8217;t in your PATH, add it to&nbsp;<code>~/.bashrc</code>:</li>
</ol>



<pre class="wp-block-code"><code>echo 'export PATH=$PATH:/usr/local/bin' &gt;&gt; ~/.bashrc
source ~/.bashrc
</code></pre>



<ol start="4" class="wp-block-list">
<li>Alternatively, move&nbsp;<code>wp</code>&nbsp;to&nbsp;<code>/usr/bin</code>&nbsp;instead:</li>
</ol>



<pre class="wp-block-code"><code>sudo mv /usr/local/bin/wp /usr/bin/wp
</code></pre>



<h4 class="wp-block-heading" id="issue-2-failed-to-get-php-binary-path">Issue 2: &#8220;Failed to get PHP binary path&#8221;</h4>



<p><strong>Problem</strong>: WP-CLI can&#8217;t find the PHP binary.</p>



<p><strong>Solution</strong>: Specify the PHP binary path explicitly:</p>



<pre class="wp-block-code"><code>wp --path=/usr/bin/php8.1 core version
</code></pre>



<p>Or add it to your config file:</p>



<pre class="wp-block-code"><code><em># ~/.wp-cli/config.yml</em>
php: /usr/bin/php8.1
</code></pre>



<p>Find your PHP binary path:</p>



<pre class="wp-block-code"><code>which php
</code></pre>



<h4 class="wp-block-heading" id="issue-3-permission-denied-errors">Issue 3: Permission Denied Errors</h4>



<p><strong>Problem</strong>: WP-CLI commands fail with permission errors.</p>



<p><strong>Solutions</strong>:</p>



<ol class="wp-block-list">
<li>Run commands as the web server user (usually&nbsp;<code>www-data</code>&nbsp;on Ubuntu/Debian):</li>
</ol>



<pre class="wp-block-code"><code>sudo -u www-data wp plugin list
</code></pre>



<ol start="2" class="wp-block-list">
<li>Or adjust file ownership:</li>
</ol>



<pre class="wp-block-code"><code>sudo chown -R www-data:www-data /var/www/html
</code></pre>



<p><strong>Important</strong>: Never run WP-CLI as root in production. Always use the appropriate web server user.</p>



<h4 class="wp-block-heading" id="issue-4-this-does-not-seem-to-be-a-wordpress-installation">Issue 4: &#8220;This does not seem to be a WordPress installation&#8221;</h4>



<p><strong>Problem</strong>: WP-CLI doesn&#8217;t recognize your WordPress installation.</p>



<p><strong>Solutions</strong>:</p>



<ol class="wp-block-list">
<li>Ensure you&#8217;re in the WordPress root directory containing&nbsp;<code>wp-config.php</code>:</li>
</ol>



<pre class="wp-block-code"><code>ls -la wp-config.php
</code></pre>



<ol start="2" class="wp-block-list">
<li>If WordPress is in a subdirectory, specify the path:</li>
</ol>



<pre class="wp-block-code"><code>wp --path=/var/www/html/wordpress core version
</code></pre>



<ol start="3" class="wp-block-list">
<li>Or set the path in your config file (see&nbsp;<a href="https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/krasenslavov/Desktop/wpcli-mastery/blog-posts-published/01-install-configure-wpcli-ubuntu-debian.md#configuration">Configuring WP-CLI</a>&nbsp;section).</li>
</ol>



<h4 class="wp-block-heading" id="issue-5-memory-limit-errors">Issue 5: Memory Limit Errors</h4>



<p><strong>Problem</strong>: Commands fail with &#8220;Allowed memory size exhausted&#8221; errors.</p>



<p><strong>Solution</strong>: Increase PHP memory limit:</p>



<pre class="wp-block-code"><code>php -d memory_limit=512M /usr/local/bin/wp plugin update --all
</code></pre>



<p>Or permanently increase it in&nbsp;<code>php.ini</code>:</p>



<pre class="wp-block-code"><code>sudo nano /etc/php/8.1/cli/php.ini
</code></pre>



<p>Find and modify:</p>



<pre class="wp-block-code"><code>memory_limit = 512M
</code></pre>



<p>Restart PHP if needed:</p>



<pre class="wp-block-code"><code>sudo systemctl restart php8.1-fpm
</code></pre>



<h4 class="wp-block-heading" id="need-more-help">Need More Help?</h4>



<ul class="wp-block-list">
<li><a href="https://wp-cli.org/">Official WP-CLI Documentation</a></li>



<li><a href="https://github.com/wp-cli/wp-cli/issues">WP-CLI GitHub Issues</a></li>



<li><a href="https://wordpress.stackexchange.com/questions/tagged/wp-cli">WordPress Stack Exchange</a></li>



<li><a href="https://make.wordpress.org/cli/handbook/contributing/">WP-CLI Community Slack</a></li>
</ul>



<h3 class="wp-block-heading" id="next-steps-next-steps">Next Steps</h3>



<p>Now that WP-CLI is installed and configured, you&#8217;re ready to start managing WordPress from the command line!</p>



<h4 class="wp-block-heading" id="essential-commands-to-learn-next">Essential Commands to Learn Next</h4>



<ol class="wp-block-list">
<li><strong><a href="https://file+.vscode-resource.vscode-cdn.net/blog/essential-wpcli-commands">20 Essential WP-CLI Commands Every WordPress Developer Should Know</a></strong>&nbsp;&#8211; Master the most important commands</li>



<li><strong><a href="#">WP-CLI Config Files: Best Practices</a></strong> &#8211; Advanced configuration techniques</li>



<li><strong><a href="https://file+.vscode-resource.vscode-cdn.net/blog/automate-wordpress-backups-wpcli">Automate WordPress Backups with WP-CLI</a></strong>&nbsp;&#8211; Build your first automation script</li>
</ol>



<h4 class="wp-block-heading" id="recommended-learning-path">Recommended Learning Path</h4>



<p><strong>Week 1</strong>: Practice basic commands</p>



<ul class="wp-block-list">
<li><code>wp core version</code>,&nbsp;<code>wp plugin list</code>,&nbsp;<code>wp theme list</code></li>



<li>Learn&nbsp;<code>wp help [command]</code>&nbsp;to explore documentation</li>
</ul>



<p><strong>Week 2</strong>: Database operations</p>



<ul class="wp-block-list">
<li>Export/import databases:&nbsp;<code>wp db export</code>,&nbsp;<code>wp db import</code></li>



<li>Search and replace:&nbsp;<code>wp search-replace</code></li>
</ul>



<p><strong>Week 3</strong>: Automation basics</p>



<ul class="wp-block-list">
<li>Write simple bash scripts using WP-CLI</li>



<li>Set up cron jobs for automated tasks</li>
</ul>



<p><strong>Week 4</strong>: Advanced techniques</p>



<ul class="wp-block-list">
<li>Custom WP-CLI commands</li>



<li>Integration with deployment pipelines</li>
</ul>



<h4 class="wp-block-heading" id="join-the-wpcli-mastery-community">Join the WPCLI Mastery Community</h4>



<p>Want to master WordPress automation and save 10+ hours per week?</p>



<p><strong><a href="/#pricing">Join our free email course</a></strong> and get:</p>



<ul class="wp-block-list">
<li>Free WordPress backup automation script</li>



<li>Weekly WP-CLI tips and tricks</li>



<li>Early access to WPCLI Mastery course ($99 early bird pricing)</li>
</ul>



<h3 class="wp-block-heading" id="conclusion">Conclusion</h3>



<p>Installing WP-CLI on Ubuntu and Debian is straightforward and takes less than 10 minutes. Once installed, you&#8217;ll have a powerful tool that can save you hours of manual WordPress administration work.</p>



<p>The key steps we covered:</p>



<ol class="wp-block-list">
<li>Download the WP-CLI Phar file</li>



<li>Make it executable and move to system PATH</li>



<li>Verify installation with&nbsp;<code>wp --info</code></li>



<li>Configure global and project-specific settings</li>



<li>Set up command aliases for efficiency</li>



<li>Keep WP-CLI updated regularly</li>
</ol>



<p>With WP-CLI installed, you&#8217;re now equipped to manage WordPress sites like a DevOps professional. The commands you learn will compound over time—what takes hours in the WordPress admin panel can often be done in seconds with WP-CLI.</p>



<p><strong>Ready to level up?</strong> Check out our <a href="#">complete WP-CLI command reference</a> or start <a href="#">automating your WordPress backups</a>.</p>



<p><strong>Have questions about installing WP-CLI?</strong>&nbsp;Drop a comment below, and I&#8217;ll help you troubleshoot!</p>



<p><strong>Share this guide</strong>&nbsp;with other WordPress developers who could benefit from WP-CLI.</p>
<p>The post <a href="https://wpclimastery.com/blog/how-to-install-and-configure-wp-cli-on-ubuntu-debian-2025-complete-guide/">How to Install and Configure WP-CLI on Ubuntu/Debian (2025 Complete Guide)</a> appeared first on <a href="https://wpclimastery.com">WP-CLI Mastery</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wpclimastery.com/blog/how-to-install-and-configure-wp-cli-on-ubuntu-debian-2025-complete-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
