This is Lesson 2 of Tutorial: Deploying a Drupal Application.
Generate a production-ready deployment artifact for a Drupal 9 application.
In order to complete this lesson you will need:
At a minimum, use Composer to remove development dependencies and optimize your application's autoloader
:
composer install --no-dev --optimize-autoloader
This will install only the dependencies in your composer.json
's "require
" array (not in the "require-dev
" array) and will optimize Composer's autoloader
, which significantly improves application performance.
You should also consider performing the following manual steps:
CHANGELOG.txt
, from your docroot
directory. These can inadvertently reveal your exact Drupal core version to malicious site visitors.After you've manually prepared your codebase for production, you will need to create a new Git tag.
Using a git tag for deployment is a best practice because tags are immutable. In other words, after it has been created a tag cannot be changed. For instance, using a tag will prevent someone from accidentally pushing a new commit to a branch that is deployed to your production environment. This cannot happen with a tag.
git tag 1.0.0 -m 'This is the first major release!'
Now that your tag is cut, you can push it to Acquia Cloud Platform:
git push origin 1.0.0
You should use a naming convention for your tags that works well for your team. The most popular (and recommended option) is Semantic Versioning (semver). In short, semver provides a set of rules for naming tags. The rules help you track:
Tags using semver take the form MAJOR.MINOR.PATCH
. For more information, see semver.org.
In combination with Composer version constraints, you can use semver to ensure that your application's dependencies are never accidentally updated to a backwards incompatible version.
Now that you have a deployment artifact, you're ready to deploy it on your Acquia Cloud Platform non-production environment! Reminder: Before moving to Production, ensure you take a database backup of your Production environment first.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Oct 22 2025 09:07:31 GMT+0000 (Coordinated Universal Time)