---
title: "Lesson 3: Release the Kraken (code) - Deploying a Drupal 9 Application"
date: "2025-02-06T01:21:38+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/92201-lesson-3-release-kraken-code-deploying-drupal-9-application"
id: "0f3598af-c12d-4bfe-8537-7d72cffe5fcd"
---

Table of contents will be added

This is **Lesson 3** of [Tutorial: Deploying a Drupal Application](/node/94606).  
 

**In this lesson we will:**
===========================

1.  Backup the production database.
2.  Deploy a tagged deployment artifact to the production environment.

 

**Lesson Goal**
===============

In this next lesson we will deploy a production-ready tagged deployment artifact to a non-production environment on Acquia Cloud Platform.

To complete this lesson you will need:

*   A Drupal 9 application deployment artifact.
*   Access to an Acquia Cloud Platform subscription.

 

Lesson
======

**Backing up the database**
---------------------------

You should always backup your production database prior to a release, even if you're entirely confident in the code that you're releasing. Acquia Cloud Platform provides an interface for [quickly creating environment specific backups](/node/56287).  
  

![Dashboard showing Dev Environment overview with options for Code, Databases, and Files. An arrow points to the "Back up" button.](https://acquia.widen.net/content/1fd9d072-4001-4014-9227-4ee29bc2256d/web/ka0Pb0000008irt00N6g00000VCdgi0EM6g000002WpSR.png)

**Deploying the codebase**
--------------------------

Next we will take your Git tag and deploy it to a non-Production environment first. In these examples we will use the Dev environment to first show how code can be deployed.

Once you have **tested** your code from your **non-Production** deployment _**thoroughly**_ you can then deploy to the **Production** environment.

There are a couple of ways to do this:

### **Option 1: Deploy Using Acquia Cloud Platform user interface**

You can [use the Acquia Cloud Platform interface to deploy](/node/56318) the Git tag to your environments.

#### Deploying to non-Production environment

This is an example using the **Dev** environment:  
  

![Popup window on a software interface for deploying code to a development environment, with options for different server environments.](https://acquia.widen.net/content/57e55f9c-f3ad-4af3-96b8-04783d542770/web/ka0Pb0000008irt00N6g00000VCdgi0EM6g000002WpSb.png)

### **Option 2: Deploy Using Drush**

Acquia Cloud Platform provides a set of Drush commands that allow you to interact with your application via the Command Line Interface (**CLI**). These commands are installed when you [download your Drush aliases](/node/56326) from Cloud Platform.

You may use these to deploy your new tag to your environments. This can be particularly helpful if you would like to script your deployments.

#### Deploying to non-Production environment

    drush @myapp.dev ac-code-path-deploy 1.0.0

#### Deploying to Production environment

    drush @myapp.prod ac-code-path-deploy 1.0.0

#### **Production Mode**

If this is your first release on Acquia Cloud Platform, you should take this opportunity to put your site into [production mode](/node/56307). In Production mode, you cannot copy your files or database to your Production environment. This protects you from possibly destroying your live application by overwriting the live Production files and databases.  
  

![Dashboard interface showing "Prod Environment" overview with options for code, databases, and files. "Actions" menu is highlighted with various options.](https://acquia.widen.net/content/b8c583b5-661e-46e6-83f1-5276987660e3/web/ka0Pb0000008irt00N6g00000VCdgi0EM6g000002WpT0.png)

  
 

**Proceed to**  
[Lesson 4: Post Code Deploy - Deploying a Drupal 9 Application](/node/94156)
---------------------------------------------------------------------------------------------

 

**Resources**
=============

*   [Create environment specific backups](/node/56287)
*   [Using Drush aliases](/node/56326)
*   [Using Production mode to protect your live application](/node/56307)