PHP: Hypertext Preprocessor (PHP) is an interpreted programming language that is widely used, and especially well suited for web development. Drupal and many other popular web applications are written in PHP. If you wish to develop Drupal modules or be able to do advanced Drupal theming, you will need to learn PHP.

Example tasks

  • Write a custom Drupal module
  • Make modifications to add features or fix bugs in Drupal core or contributed modules
  • Work with other PHP frameworks like Symfony and WordPress or write custom PHP scripts


PHP has been around for a long time, so there is a plethora of resources available for learning it. Because most PHP is backwards-compatible with older versions of the language, many older lessons and examples are still relevant today. However, the language has evolved in recent years, introducing new features and best practices, so we recommend always using the latest stable version of PHP and associated best practices when possible.

Drupalize.Me resources

  • PHP for Beginners Part 1
    • Learn how to get started with PHP and how to use variables and functions.
  • PHP for Beginners Part 2
    • Get further into PHP: learn about how PHP handles form submissions, and working with files.
  • PHP for Beginners Part 3
    • This introduces you to working with databases in PHP. You'll learn how to connect to a MySQL database, use SQL queries, and understand what PHP Data Objects (PDO) are and how to use them.
  • Object-oriented PHP
    • Once you've mastered PHP basics you'll also want to learn how to apply object-oriented programming techniques to your PHP code.

More Guides

We have guides on many Drupal skills and topics.

Explore guides

External resources

  • (
    • The official documentation of the PHP project. Especially useful for looking up language features and usage examples.
  • PHP: The Right Way (
    • We're constantly using this as a source to locate information about current PHP best practices.