I am having a weird issue with deploying bedrock using Capistrano, and so I want to outline the issue first, and then hopefully, I will comment the solution later on.
- The deployment successfully completed without errors. All the necessary folders are present on the server.
- I used SFTP to upload the filled-out
.envfile to my
public_htmlsymlink is pointing correctly to the
current/webrelease thanks to a custom deployment task.
- I am using this line exactly as provided by roots:
set :linked_files, fetch(:linked_files, ).push('.env')
However, there is an issue: My domain redirects to 404 at all levels, even at http://example.com/wp/wp-admin
My first instinct was that the database credentials were wrong; however, I was able to remotely connect to my database using MySQL Workbench without issue. The database credentials are not the issue.
I listed out the file contents of the
/current/ directory using SSH, and noticed that
.env was missing. To double-check, I opened my SFTP client, and noticed that
.env is present; however, it is a hidden directory instead of a file. Hopefully these images show the issue:
SFTP shows .env as folder:
SSH missing .env: