Closed joemaller closed 8 years ago
Any movement on this? I tried to make the same change as ideasonpurpose/basic-wordpress-box#4 but all I see when I run $ wp theme status
in the site
folder is;
Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Development/Testing/wp431-php55.dev/site/wp-includes/wp-db.php on line 1452
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /Development/Testing/wp431-php55.dev/site/wp-includes/wp-db.php on line 1482
Warning: mysql_connect(): No such file or directory in /Development/Testing/wp431-php55.dev/site/wp-includes/wp-db.php on line 1482
Error:
<h1>Error establishing a database connection</h1>
<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>localhost</code>. This could mean your host's database server is down.</p>
<ul>
<li>Are you sure you have the correct username and password?</li>
<li>Are you sure that you have typed the correct hostname?</li>
<li>Are you sure that the database server is running?</li>
</ul>
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='https://wordpress.org/support/'>WordPress Support Forums</a>.</p>
line:1452
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
line:1482
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
I could also be using wp-cli incorrectly as well...
My bad...
Looks like I needed to SSH into the Vagrant box.
vagrant ssh
Then WP-CLI works
vagrant@debug:/vagrant/site$ wp theme status
3 installed themes:
A twentyfifteen 1.3
I twentyfourteen 1.5
I twentythirteen 1.6
Legend: A = Active, I = Inactive
Glad you got it working. WP-Cli opened up some other possibilities I'm experimenting with. I should have an update posted soon.
The command is
wp rewrite flush --hard
, more here: http://wp-cli.org/commands/rewrite/flush/see ideasonpurpose/basic-wordpress-box#4