Setting up Contao workspace on c9.io

by Thomas Urban

c9.io is an online service providing IDE including virtual machines for developing software. This short tutorial tries to explain how to set up a workspace with Contao e.g. for developing patches to the Contao core hosted at Github.

Preparing on github.com

If you want to change code of Contao in preparation for a pull request for merging your changes into master branch of Contao core, you might need to fork the latter one on github.com first. When you have linked your account at c9.io with your account at github.com, then forking the repository on github.com will make it available for select to clone on dashboard at c9.io.

  1. Log into github.com.
  2. Open Contao core repository at https://github.com/contao/core.
  3. Click on "Fork" button in upper-right corner.

This will create a repository core in your account at github. So if your account is johndoe there, the forked repository will be available at https://github.com/johndoe/core.

When on c9 dashboard ...

  1. Log into your account at c9.io and make sure it is linked it with your account at github.com.
  2. When both accounts are linked with each other all your repositories at github are listed as projects in a selector in left-hand panel on dashboard.
  3. Next create a new workspace:
    1. If you have forked contao/core on github.com before: click on the forked project listed in that selector.
    2. If you haven't forked contao/core and want to start new workspace from that original repository: click on upper-left button "create new workspace" to be cloned from URL https://github.com/contao/core.git.
  4. In either case start editing the new workspace when it's creation has been finished.

When in workspace ...

  1. Enter these commands in shell prompt at bottom of window:
    curl -sS https://getcomposer.org/installer | php
    php composer.phar install --prefer-dist
    mysql-ctl start
  2. Right-click on file core/contao/install.php and select "Run".
  3. Apache is started in workspace opening another tab in shell panel at bottom of workspace view.
  4. Copy link listed in that tab into clipboard and open another tab of your browser for requesting that URL.
  5. This will open Contao installer. Process it as usual, but ensure to use the following values on setting up database:
    • The database driver might be MySQLi.
    • The hostname must be 127.0.0.1 ... the default localhost isn't working.
    • The username is equivalent to your username at c9.io
    • Keep the password empty!
    • The database is always named c9.

After that, you're finished and may start adjusting Contao to your needs.

Go back