I have a composer WP starter installation on my local mac using mamp. It works as expected. I'm using phpdotenv to hide my wp-config.php settings and I have the wordpress directory moved into a sub-directory under document root. I use a virtual host on the local mac dev2.domainname. I used wp db migrate pro to find and replace dev2 to dev3 as the domainname is the same on local and AWS. The only other difference is the database connection settings. I know the database connection settings are correct as I use them in the shell script that runs composer and installs wp using wp-cli. The script runs perfectly. But for some reason and I have looked at httpd.conf, .htaccess, .env settings, everything I can think of I get "error establishing a database connection". Any ideas on where to look or how to diagnose the problem? Thx
I have a composer WP starter installation on my local mac using mamp. It works as expected. I'm using phpdotenv to hide my wp-config.php settings and I have the wordpress directory moved into a sub-directory under document root. I use a virtual host on the local mac dev2.domainname. I used wp db migrate pro to find and replace dev2 to dev3 as the domainname is the same on local and AWS. The only other difference is the database connection settings. I know the database connection settings are correct as I use them in the shell script that runs composer and installs wp using wp-cli. The script runs perfectly. But for some reason and I have looked at httpd.conf, .htaccess, .env settings, everything I can think of I get "error establishing a database connection". Any ideas on where to look or how to diagnose the problem? Thx
there are several reasons why you can get this type of error,
and of course your DB server could be down, but if you are able to access it using phpmyadmin then that ain't the case.
How to nail it down?
Hopefully it should all work, else, the issue is with the DB being corrupt, so you'll need to re-export it again and repeat step 3.