Site building best practices

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Most of the pages in this guide have content that applies to any version of Drupal, despite being in the Drupal 7 documentation.

Best practices

List of quick pointers and a link to programming best practices.

Backup your database and files

Backups are not just website best practices, it is a requirement for all forms of development.

Never hack core

"Never hack core!"

Avoid hardcoding

The temptation to hardcode happens to the best of us - that's why even the best of us are at risk of being burned by it.

Building Drupal 7 with Drupal 8 in mind

Since Drupal 8 has been released most Drupal 7 websites will eventually need to consider an upgrade to 8. If you are going to create a new

Ensure that your site is secure

The Drupal security guide has a section on securing your site with a useful list of items to work through.

Use test sites

There are many programs (XAMPP, MAMP, Apache2Triad) that help you setup a local test system easily. You should set one up to play with your

Taking your site live

Once you've got your Drupal installation set up just the way you want it, there are a few final considerations before you unleash it on the

Avoid too many modules

It is always good to think it over before enabling a module; too many enabled modules can slow down your site and may be tricky when

Contributed versus custom code and everything in between

Some guidelines on how to choose sensibly what code to include in your web application.

Guide maintainers

schiavone's picture