I've been trying to setup a wordpress site through c9.io but have been experiencing some issues. I've followed the instructions to the letter(as posted on their website) and I still seem to be having some problems getting it set up. I did the following steps:
After doing all of those 4 steps and I click the link that is produced from running the index.php file, I get the following message from the browser: "Error establishing a database connection". I don't know what I'm doing wrong since I've been following the instructions as closely as I possibly could. The instructions can be found from this link btw: https://docs.c9.io/v1.0/docs/running-wordpress-on-cloud9
If anyone can tell me what I'm doing wrong and how to fix it I would greatly appreciate it. It seems like everything is working properly until I click on the link produced by index.php. Once I click on that link I receive the error message. Please let me know how you guys were able to remedy this issue. Thanks.
Due to the fact that your cloud9 username is longer than 16 characters and MySQL usernames cannot be more than 16 characters long, you would have to update your wp-config.php to pass only the first 16 characters. Currently it should say something like:
define('DB_USER', getenv('C9_USER'));
you can replace getenv('C9_USER')
with the first 16 characters of your username. This should make it work.