Developer documentation | Drupal.org
Skip to search
Can we use first and third party cookies and web beacons to
understand our audience, and to tailor promotions you see
Documentation
Curated Guides
Drupal User Guide
Evaluator Guide
Local Development Guide
Drupal Wiki
Drupal
Develop
Drupal 7
API Info
Complete API Reference
Drupal APIs
Drupal books
Drupal Wiki
Drupal
Develop
Drupal 7
Develop
Documentation for developers about tools, processes, and standards.
Local server setup
Local server setup for Drupal.
Docker-based development environments
Windows development environments
Managing Mail on a local server
Enable verbose error logging
Development tools
Commonly used tools to aid in Drupal development
Development tools overview
Drush
Editors and IDEs
DrupalPod
XHProf Code Profiler
Xdebug debugger
AI Coding Tools for Drupal Development
Disable caching
PHPStan
Stylelint
Working efficiently with the command line
cspell
Using Composer
Learn how to use Composer to manage Drupal projects and their dependencies.
Using Composer in a Drupal project
Composer in relation to Drush Make
Using Composer to Install Drupal and Manage Dependencies
Add a composer.json file
Starting a Site Using Drupal Composer Project Templates
Managing dependencies for a contributed project
Managing dependencies for a custom project
Preparing your site for Composer 2
Tricks for using Composer in local development
Troubleshooting Composer
Using Drupal's Composer Scaffold
Using packages.drupal.org
Using packagist-signed.drupalcode.org
Using the Lenient Composer Plugin
Git version control system
How to install and use Git for version control in Drupal projects
Introduction to Drupal Git
Setting up Git for Drupal
Using Git to Contribute to Drupal
Using GitLab to Contribute to Drupal
Git for Drupal project maintainers
Common development workflow
Git branching strategy for multiple developers
Managing a drupal.org theme, module, or distribution project
Information on how to create and manage a module, theme, or distribution project hosted on drupal.org
Creating a new project
Creating distributions
Documenting your project
Maintainership
Packaging a distribution
Security Coverage
Security
Best practices for secure sites and code.
Handle user input with care
Why does Drupal filter on output?
HMAC best practices
Information disclosure in error messages not a weakness (Path disclosure, SQL error messages, etc.)
Your Drupal site got hacked. Now what?
Drupal project issues
All about how the Drupal project uses "issues" to keep track of bugs and feature requests
Overview of projects and issues
Fields and other parts of an issue
Issue procedures and etiquette
Usability testing
Guidelines for conducting and recording usability tests and communicating their results. Also, the findings of previous tests.
Usability testing
Drupal usability test results
Tutorial how-to conduct usability testing
Recording a usability test
Communicate the results effectively with the community
Profiling Drupal
Benchmarking and profiling Drupal.
Benchmarking and profiling Drupal
Apache Bench (ab)
Dummy content and common gotchas
Profiling memory usage
[Obsolete] Coding standards
[Obsolete] The Drupal Coding Standards apply to Drupal and its contributed modules.
[Obsolete] PHP
[Obsolete] CSS
[Obsolete] JavaScript coding standards
[Obsolete] Markdown coding standards
[Obsolete] SQL
[Obsolete] Twig coding standards
[Obsolete] Drupal Markup Style Guide
[Obsolete] Spelling
[Obsolete] YAML Configuration files
[Obsolete] Composer package naming conventions
User interface standards
User Interface standards for Drupal.
Form elements
Buttons
Dropbutton
Radio buttons
Checkboxes
Select list
Contextual Links
Local action
Tabs
Details
Fieldsets
Vertical tabs
Listings
Table
Interface text
Machine name
Tours
Tour text standards
Theming Drupal
How to work with Drupal themes.
Defining a theme with an .info.yml file
Drupal theme folder structure
Adding Regions to a Theme
Adding stylesheets (CSS) and JavaScript (JS) to a Drupal theme
Twig in Drupal
Creating sub-themes
Using Stable/Stable 9 as a base theme
Classy themes css selectors
Using Single-Directory Components
Including Default Image Styles With Your Theme
Including Part Template
Using attributes in templates
Modifying attributes in a .theme file
Working with breakpoints in Drupal
Creating advanced theme settings
Theming differences between Drupal 6, 7 & 8
Upgrading 7.x themes to 8.x
Drupal Twig conversion instructions (tpl.php to html.twig)
Creating automation tools for custom themes (Gulpjs)
Sub-Theme inheritance
Update the throbber
Z-indexes in Drupal 8
Add meta description and title programmatically
Creating modules
This guide includes tutorials and other information that you need to create modules for Drupal.
Getting Started - Background & Prerequisites
Naming and placing your Drupal module
Let Drupal know about your module with an .info.yml file
Include default configuration in your Drupal module
Defining and using your own configuration in Drupal
Create a custom page
Creating custom blocks
Creating custom field types, widgets, and formatters
Subscribe to and dispatch events
Building a Views display style plugin for Drupal
Adding stylesheets (CSS) and JavaScript (JS) to a Drupal module
Step by step tutorial "Lorem Ipsum"
Step by step tutorial: Hello World
Understanding hooks
Drupal APIs
Drupal has many APIs that make it easy to alter and extend, and to help developers with common tasks. Learn how to use them in your code
Access Policy API
AJAX API
Authentication API
Batch API
Block API
Cache API
(deprecated) CKEditor 4 API
CKEditor 5 API
Configuration API
Database API
Entity API
Filter API
Form API
JavaScript API
Layout API
Logging API
Menu API
Middleware API
Migrate API
Plugin API
RESTful Web Services API
Render API
Responses
Routing system
Runtime Assertions
Serialization API
Services and dependency injection
State API
Text Editor API
Tour API
Translation API
Typed Data API
Update API
HTMX
Icon API
Token API
Automated testing
The testing framework in Drupal (Testing module, previously SimpleTest).
PHPUnit in Drupal
Browser testing using Cypress
Converting SimpleTests to PHPUnit tests
JavaScript testing using Nightwatch
Performance tests
Run core development checks
Types of tests
Test failures
Upgrading and converting Drupal 7 modules
This guide provides information and specific steps for upgrading contributed and custom modules from Drupal 7 to the latest version.
Intro & Before you start: Setting up a Drupal 8 module dev environment
Step 1: Convert mymodule.info to mymodule.info.yml
Step 2: Convert automated tests to Drupal 8
Step 3: Convert hook_menu() and forms
Step 4: Convert Drupal 7 Variables to Drupal 8 Configuration
Step 5: How to upgrade D7 variables to D8's state system
Debugging Drupal 8 module upgrades
Resources and tutorials
D7 to D8 Upgrade: Generated HTML
D7 to D8 tutorial: pathinfo module
D7 to D8 upgrade tutorial: Pants module
D7 to D8 upgrade: fields, widgets and formatters
D7 to D8 upgrade tutorial: Convert hook_menu() and hook_menu_alter() to Drupal 8 APIs
WSCCI Conversion Guide
WSCCI Conversion Guide - Pass 1
WSCCI Conversion Guide - Pass 2
WSCCI Conversion Guide - Pass 3
WSCCI Conversion Guide - Best practices
Core modules and themes
Drupal core structure and components.
Basic structure of Drupal
Core modules
Core themes
Experimental extensions
Deprecated and obsolete modules and themes
External Libraries in Core
Information on external CSS, JS, and PHP dependencies.
Mobile Drupal sites
Mobile guide
Front-end performance
Mobile Testing Tools
Mobile-specific website
Native mobile apps
Related mobile technologies
Responsive Design + Server-side Components (RESS)
Responsive Images
Responsive web design
Web-based mobile apps
Decoupled Drupal
Provide content to decoupled front-ends that are responsible for presenting or displaying content.
Decoupled Drupal Stacks
APIs and useful modules
Frontend Libraries
Decoupled Drupal Canvas
Group maintainers
Drupal’s online documentation is © 2000-2026 by the individual contributors and can be used in accordance with the
Creative Commons License, Attribution-ShareAlike 2.0
. PHP code is distributed under the
GNU General Public License
Infrastructure management for Drupal.org provided by
Need a Drupal 7 extended support partner? Consider Tag1.
News items
News
Planet Drupal
Social media
Sign up for Drupal news
Security advisories
Jobs
Our community
Community
Services
Training
Hosting
Contributor guide
Groups & meetups
DrupalCon
Code of conduct
Documentation
Documentation
Drupal Guide
Drupal User Guide
Developer docs
API.Drupal.org
Drupal code base
Download & Extend
Drupal core
Modules
Themes
Distributions
Governance of community
About
Web accessibility
Drupal Association
About Drupal.org
Drupal is a
registered trademark
of
Dries Buytaert