Contributor development and testing tools

Last updated on
14 March 2026

This documentation needs review. See "Help improve this page" in the sidebar.

Shorter URL to this page: drupal.org/tools

Contributing to Drupal often means improving its software—think fixing bugs or adding features to Drupal core and contributed projects like themes and modules. To get started, you’ll need to run the latest development version of Drupal with patches (proposed changes) applied. This guide will walk you through setting up your environment.
 
Option Best for Advantages Limits
Test code changes submitted by others
Quick and simple to set up
Supports collaboration (multiple people can test together)
Not ideal for developing your own patches or merge requests
Recommended for first-time contributors at a Drupal contribution event
Creating and testing your own patches

Nothing needs to be installed on your computer

Usually Supports collaboration (multiple people can test together)

Online Only - Browser based

Recommended if you already have ddev installed.
Creating and testing your own patches locally

Works offline

Requires admin level access to your computer to set-up

Site runs only on your local machine (hard to share unless screen-sharing)

Pro Tip: Combine Multiple Options
You don’t have to choose just one! Develop patches in your local environment and, when you’re ready to share, spin up a testing site to showcase your work to others.

1. Drupal Testing site or Online Preview

Simplytest.me: Use as Online Testing Environment (With or Without Patches)

Simplytest.me is a free online tool that allows you to create temporary environments for testing Drupal core and contributed projects, such as modules, themes, and distributions. You can test specific released versions (e.g., 11.0.1, 2.0.1), development versions (e.g., 11.2.x, 8.x-2.x), or even apply patches from Drupal issues to test custom configurations. Below is a step-by-step guide to using it effectively.

Note (Dec. 2024): The "One Click Demos" feature has been unreliable recently, so it’s recommended to follow the manual steps outlined here for consistent result

Step-by-Step Instructions

  1. Visit the Site:
  2. Select Your Project:
    • In the Project field:
      • For a contributed project (e.g., a module or theme), type its name.
      • For Drupal core, simply enter "Drupal core."
  3. Choose a Version:
    • Pick the version you want to test:
      • Released versions (e.g., 11.0.1, 2.0.1) appear at the top of the list.
      • Development versions (e.g., 11.2.x, 8.x-2.x) are listed toward the bottom.
  4. Add Additional Modules or Themes (Optional):
    • Expand the "Advanced" section.
    • Click the Add additional project button and type the project name. Repeat as desired.
    • Simplytest.me will automatically select versions compatible with your chosen project and version.
  5. Apply Patches (Optional):
    • Expand the "Advanced" section.
    • Paste the full URL(s) to any Drupal patch(es) you want to apply.
    • Requirements:
  6. Launch the Site:
    • Click the button to create your test site and wait for it to build.
    • Once ready, you can access it and log in as the "user 1" administrator:

Tugboat: Test Merge Requests with Automatic Preview

For Drupal Core issues (and some contributed project issues) that use merge requests, an automatic test site can often be generated using Tugboat. It requires registration, or logging in via another account.

Here’s how it works:

  • Accessing the preview:
    • If a merge request has an automatic preview available, you’ll see a View live preview link under the merge request section of the issue.
    • Click the View live preview link to launch the test site.
  • Login details:
    • Log in as the "user 1" administrator with these credentials:
      • Username: admin
      • Password: admin
    • The site email address is: admin@example.com
  • Additional resources:

2. Cloud based development environment

DrupalPod via Drupal Forge

This project allows you to work on Drupal core contributions with a familiar setup of a "normal" Drupal website. This option does not require any changes to your personal or work-provided computer because it is all running in the cloud.

Start Drupal contributions with 1 click using Drupal Forge. Follow the instructions on DrupalPod + Drupal Forge page including a Demo Video of Drupal Forge.

Project URL: https://drupal.org/project/DrupalPod

DDev in the Cloud

This project allows you to work on Drupal core contributions with the recommended ddev environment. This option does not require any changes to your personal or work-provided computer because it is all running in the cloud.

Follow the instructions on the DDev in the Cloud page to get started.

Project URL: https://github.com/ddev/coder-ddev

3. Local development environment

Option 1. Use DDEV for local development

The recommended Drupal local development environment for Linux, macOS, and Windows is DDEV.

Follow the instructions to install Drupal using DDEV for local development.

Drupal Core

The fastest method is by applying the patch. If you want to work on the MR locally, you can check out the issue branch with Git.

Applying the MR patch

Download the patch and apply it:

wget https://git.drupalcode.org/project/drupal/-/merge_requests/8251.diff
patch -p1 < 8251.diff
Git - check out the Issue Repo

To use Git to test a Merge Request for an existing Issue on Drupal Core, with further work in mind, you can add the MR URL as a remote. From the MR page click the blue Code button and select "Check out branch". The modal will give you the URL in the git fetch line. Looking at this MR the following would set us up.

# Add the MRs URL as the remote.
git remote add mr-8251 git@git.drupal.org:issue/drupal-3418353.git
# Fetch the remote
git fetch mr-8251
# Create a local branch
git branch 3418353-restrict-rebuild-permission mr-8251/3418353-restrict-rebuild-permission
# Switch to that local branch
git checkout 3418353-restrict-rebuild-permission

Contrib modules

There are multiple approaches for working on contrib modules. These are the most common.

Adding via Composer

To test the patch of a Merge Request you can add the module as you would during normal site building and patch it.

Looking at this MR for Admin Toolbar this would set us up.

ddev composer require drupal/admin_toolbar:3.x-dev@dev
cd web/modules/contrib/admin_toolbar/
wget https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/142.diff
patch -p1 < 142.diff
Checking out the Issue Repo

To work on a Merge Request for an existing Issue on a contrib module you could clone the URL for the MR directly into the modules directory, fetch the branch and check it out.

Looking at this MR for Workbench Email this would set us up.

cd modules
git clone git@git.drupal.org:issue/workbench_email-3515843.git workbench_email
cd workbench_email/
git fetch "git@git.drupal.org:issue/workbench_email-3515843.git" '3515843-error-when-trash'
git checkout 3515843-error-when-trash

At this point you can enable the module as normal.

If you are just wanting to test a patch rather than work on an MR see Applying a patch in a feature branch.

Option 2. If you already have a local development environment

If you already have a web server, PHP, and database installed on your local computer that satisfy the requirements for the latest development of Drupal, know how to install Drupal, and know where your web root is, follow these steps to create a new Drupal site for testing a patch:

  1. Make sure you have both Composer and Git installed on your computer.
  2. Set up Git for use in the Drupal project.
  3. Follow the steps on the Version control instructions page for the Drupal core project to clone Drupal into a new directory under your web root. Change to that directory.
  4. From the Drupal root directory, run the following command to download the external dependencies for the Drupal core software:
    composer install
  5. Set up a database for your Drupal site, and install Drupal.

Testing a patch

  1. Rename the example.gitignore file to .gitignore, so that you don't accidentally commit your locally installed packages. 
  2. Use the git apply command to apply the patch you want to test.

Other ways to set up a development environment

There are many options for setting up development environments. Although we recommend the above methods, you may find the local server setup documentation section and developer tools section useful to browse.

Other Useful Tools

Drush

1. Install Drush:

  • Use Composer to install Drush for your current project. Run the command:

          composer require drush/drush

  • Ensure the Composer vendor binary directory is in your system's PATH. You can add this to your shell configuration file (e.g., .bashrc, .zshrc):

        export PATH=$HOME/.composer/vendor/bin:$PATH
2. Verify Installation:

  • After installation, confirm Drush is working by running

        drush --version

3. Utilize Drush Commands:

  • Enable Modules: drush en <module machine name>
  • Clear Cache:  drush cr
  • Database Updates: drush updb

Tags

Help improve this page

Page status: Needs review

You can: