<?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 &#8211; Everything is Broken</title>
	<atom:link href="https://play.datalude.com/blog/tag/wp-cli/feed/" rel="self" type="application/rss+xml" />
	<link>https://play.datalude.com/blog</link>
	<description>Efficiency vs. Inefficiency, in a no-holds barred fight.</description>
	<lastBuildDate>Tue, 22 Nov 2022 08:40:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>wp-cli &quot;Connection refused&quot; error</title>
		<link>https://play.datalude.com/blog/2022/11/wp-cli-connection-refused-error/</link>
					<comments>https://play.datalude.com/blog/2022/11/wp-cli-connection-refused-error/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 22 Nov 2022 08:11:08 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp-cli]]></category>
		<guid isPermaLink="false">https://play.datalude.com/blog/?p=690</guid>

					<description><![CDATA[Couldn't find anything about this with a few google searches so I decided to note it here. Weird problem: whenever I ran any wp-cli command, I'd get a list of 100+ lines of "Connection refused" before it actually did what I wanted. I tried a few things to figure it out, including So on a ... <a title="wp-cli &#34;Connection refused&#34; error" class="read-more" href="https://play.datalude.com/blog/2022/11/wp-cli-connection-refused-error/" aria-label="Read more about wp-cli &#34;Connection refused&#34; error">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Couldn't find anything about this with a few google searches so I decided to note it here. Weird problem: whenever I ran any wp-cli command, I'd get a list of 100+ lines of "Connection refused" before it actually did what I wanted. <br><br>I tried a few things to figure it out, including </p>



<ul class="wp-block-list">
<li>Searching the site for malware pointing to a blocked URL (no)</li>



<li>Checking the firewall logs (nothing)</li>



<li>Checking the db config, running performance tools on it to see that it wasn't exceeding max connections. (no) </li>



<li>Running tcpdump to see where wp-cli was trying to connect to (it wasn't)</li>



<li>Updating all plugins, themes,  (good to do anyway)</li>



<li>Checking db.php, which I found in wp-includes &#8230; which, hmmm, belongs to W3 Total Cache. </li>
</ul>



<p class="wp-block-paragraph">So on a hunch I tried </p>



<pre class="wp-block-code"><code>&gt; wp-cli plugin deactivate w3-total-cache 
Connection refused
Connection refused

... plus 200 more lines 

Connection refused
Connection refused
Connection refused
Plugin 'w3-total-cache' deactivated.

</code></pre>



<p class="wp-block-paragraph">&#8230; after which all wp-cli operations worked again. </p>



<p class="wp-block-paragraph">After some further digging, I enabled w3 Total Cache again, and found that it was configured to use redis, which wasn't running on the server. So the connection attempts were failing to connect to that. Pretty easy to sort out after that &#8230; </p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://play.datalude.com/blog/2022/11/wp-cli-connection-refused-error/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
