- Create a WorkSpace (or clone from a repository).
- Download the latest WordPress source (https://wordpress.org/download/).
- Extract the file. Copy the files/folders upload to your Cloud9 workspace root.
- Make sure MySQL is running and open myPHPAdmin (see https://kb.vylesk.com/59/cloud9-setting-up-and-using-phpmyadmin-mysql-web-interface/).
- Create a new database for the site.
- I use utf8_general_ci collation.
- Create a new user for the site (give appropriate permissions – for right or wrong I give all permissions because I have seen Cloud9 do this when doing a 5-minute install).
- I set host to “%” (all).
- Create a wp-config.php from the wp-config-sample.php. Update the database name, username, password, and set an alternative table prefix if needed.
- Run the site and browse to the root of the site. The WordPress install process should automatically begin (starting with language selection) and complete the rest of the setup.
This page – https://community.c9.io/t/setting-up-phpmyadmin/1723 – says it all, but here are the keys points again:
Using PHPMyAdmin with Cloud9
First, create a PHP workspace so you have PHP, MySQL, and Apache installed right away. You can then make sure you have MySQL installed by running:
Then install phpMyAdmin:
After the installation is complete you’ll just want to make sure mysql is running once more:
After installing phpMyAdmin, you were given a link to access PHPMyAdmin which will follow the pattern of: https://[workspacename]-[username].c9users.io/phpmyadmin. From that link, you can log in with your Cloud9 username and a blank password.
When you need to add a clean workspace in Cloud9 online IDE (c9.io) to a Bitbuck (or GitHub) repository after it is created (that is, when it is not already connected to source control).
Steps to make it happen:
- Create a new repo in Bitbucket.
- “git init” from command-line in the directory to act as the root of the new repo.
- Run “git remote add …” (e.g. “git remote add origin email@example.com:jsnelders/wp-test.git”)
- Run “git add” and “git commit -m” command to add files to Git staging, then commit (with a comment).
- Run “git push” to push the committed files to the origin
You can also:
- Add a .gitignore file.
- For WordPress, it may be worth adding “wp-config.php” to the .gitignore, depending on whether you store sensitive information (passwords, API keys) in the file.
- Inspiration found at: https://community.c9.io/t/instructions-to-port-push-cloud9-workspace-to-github/16830/19
- Ignoring files in Git: https://help.github.com/articles/ignoring-files/