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.
I am using roots/bedrock-capistrano to deploy a roots/bedrock project on a shared web host, Hostinger. There are 0 tables in the database at the moment, meaning WordPress needs to be installed.
Background
- The deployment successfully completed without errors. All the necessary folders are present on the server.
- I used SFTP to upload the filled-out
.env
file to myshared
folder. - The
public_html
symlink is pointing correctly to thecurrent/web
release 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: