Weird WP -Cli Error Connection Refused

For anyone else who comes across this post… the above issue was caused by the w3-total-cache plugin being migrated between Test and Staging servers. To fix the issue, I deactivate and exclude w3-total-cache tables from the Test server’s db export, then I do the upload and import to Staging server, which has its own “local” … Read more

Can WP-CLI modify database connection details in existing wp-config file?

You can use wp config set to update any existing value in wp-config or to add a new value: wp config set DB_NAME some_db_name wp config set DB_USER some_db_username wp config set DB_PASSWORD you_secret_value_pass See https://developer.wordpress.org/cli/commands/config/set/ Keep in mind that values are case sensitive, so if you do wp config set db_name some-db, it will … Read more