Roots Discourse

Bedrock + sage deployment issue


I’ve previously deployed a bedrock + sage site using FTP without any problems.
But now I’m trying to deploy on another web host and it just wont work.
I’m left with the “Error establishing a database connection” even though the .env file is filled out with the correct information.
My perception is that the .env file isn’t recognized,
I’ve also tried using the wp-config without any luck.
Any thoughts on how I can get this to work?

First I would check to see if your remote .env file is being loaded. You could do this by trying to dump a constant that it provides, ideally with wp-cli if you have that available. If it isn’t being loaded, figure out why: If it works locally then the problem may be with the remote host.

If the .env file is being loaded, then you should probably check the database credentials that you have in it.