Drupal 7 for Platform.sh
This template builds a Drupal 7 site, with the entire site committed to Git.
Drupal is a flexible and extensible PHP-based CMS framework. Version 7 is the legacy support version.
- PHP 7.2
- MariaDB 10.2
Run through the Drupal installer as normal by visiting
<project url>/install.php. You will not be asked for database credentials as those are already provided.
Once Drupal is fully installed, We strongly recommend switching to Redis-based caching. See the documentation for instructions on how to do so.
The following changes have been made relative to Drupal 7 as it is downloaded from Drupal.org. If using this project as a reference for your own existing project, replicate the changes below to your project.
.platform/routes.yamlfiles have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
.platform.template.yamlfile contains information needed by Platform.sh's project setup process for templates. It may be safely ignored or removed.
/public/sites/default/settings.platformsh.phpfile contains Platform.sh-specific code to map environment variables into Drupal configuration. You can add to it as needed. See the documentation for more examples of common snippets to include here.
/public/sites/default/settings.phpfile has been heavily customized to only define those values needed for both Platform.sh and local development. It calls out to
settings.platformsh.phpif available. You can add additional values as documented in
default.settings.phpas desired. It is also setup such that when you install Drupal on Platform.sh the installer will not ask for database credentials as they will already be defined.