I don’t think the files are the problem, because if an index file isn’t uploaded it’ll redirect to a 403 and if a file/folder doesn’t exist it throws a 404.
Read this, because I think that error happens only when the form is submitted:
If you get a “No such file or directory” error when trying to connect to the database, it means that you are trying to connect to database hostname localhost.
Reasons that you may see this error include:
You have not updated the configuration of your website to use the right database hostname.
The configuration is not actually being used for the database connection, and it’s hardcoded to localhost, or not set at all.
If you develop it locally before, then a bug where the database hostname from the configuration is not being used is easily overlooked. After all, if the correct hostname is localhost, then it will work even if you don’t pass it specifically, because localhost is the default.
If you have updated the configuration, please also check your code to make sure that this configuration is also actually being used.