Community

Develop on our server (preferred)

Last updated January 30, 2013.

We have development environments available with cloned and sanitized copies of *.drupal.org. If you'd like one of your own and have a decently good reason, or to access one of the existing ones and collaborate with others, here's how to get started:

  1. Make sure your public SSH key is uploaded to your Drupal.org user account (Instructions) and then ask for your public key to be manually added to the devwww server.
  2. If there is no development site which you can use, you need to request a development environment. Be sure to include a bit about your skills and plans (ideally, links to specific issues you're planning to work on)
  3. Once you have access, ssh with your user id to devwww.drupal.org to access files, e.g.
    ssh yourusername@devwww.drupal.org.
    Development environments are subdirectories of /var/www/dev on the server. Directory name looks like: [your project or username]-drupal.redesign.devdrupal.org.
    For example: /var/www/dev/metrics-drupal.redesign.devdrupal.org.
    Directory name is also the URL of your development site:
    http://metrics-drupal.redesign.devdrupal.org/.
  4. Any development site will prompt you for an initial password when you try and access it in browser. That user/pass is 'drupal/drupal'.
  5. On your development site you will want to change the password of user/1 to be able to do stuff:
    • ssh to devwww.drupal.org and go to your /var/www/dev/XXX-drupal.redesign.devdrupal.org/htdocs folder
    • run drush upwd Dries --password="somepassword"

    Dries is user/1 for Drupal.org. For Groups.drupal.org it's moshe weitzman. Other sub-sites might have different user/1.

Notes & tips

  • Use drush from the htdocs directory:
    • Get a reset password link to log in to Drupal: drush uli [username]
    • Access the database: drush sql-cli
    • Clear caches: drush cc [all|etc]
  • You can add & update contrib projects, for development only. The process for deployment them on the live site is different. You will need to include the specific modules and versions in deployment instructions.
  • Your environment will not be automatically updated as Drupal.org changes. You can have it completely rebuilt when needed. Before doing that save any local changes as patches in the issue queue or in Git branches.
    Instructions: Re-imaging a copy of your Drupal.org development environment.
  • The BZR checkout for each site is a snapshot of the modules and themes on the live site when the dev site is created. The canonical source for each project is Git, or BZR for private themes. If you are doing serious work on either, you can replace part of the BZR checkout with something else. For example:
    [drumm@devwww htdocs]$ cd sites/all/modules/
    [drumm@devwww modules]$ rm -rf drupalorg
    [drumm@devwww modules]$ git clone --recursive --branch 7.x-3.x http://git.drupal.org/project/drupalorg.git

    Now you can use Git to update code, work in branches, and make patches for issues.
  • Add ForwardAgent yes to ~/.ssh/config on your local computer to use your SSH keys on the server. This will let you push to Drupal.org Git repositories, and use more BZR commands, if you have access.
  • See instructions on the child pages about using tools like FUSE with sshfs to mount or sync the website files locally; This may be a more convenient option for editing files if you are not comfortable editing in a terminal window.