Magento 2 Zero Downtime Deployment is the extension that solves your problems with the 503 maintenance pages during deployment time. It prevents your website from breaking and you from losing potential customers even when running the deployment commands.

Moreover, the configuration is really simple. So let's get to it.

Zero Downtime Deployment configuration has 3 different sections: General, Composer and Git within which you can find different options.

Following steps to configure Magento 2 Zero Downtime Deployment extension:

General

1. Navigate to Stores > Configuration > Magefan Extensions > Zero Downtime Deployment.

2. Enable the extension.

3. Select the Static Content Deploy option. You can Deploy Only Enabled Themes or Deploy All Themes.

4. Choose whether to Enable all Caches After Deploy since sometimes some of them can be disabled after deployment.

5. Enter the Magento CLI Command you want to use during deployment.

Magento Zero Downtime Deployment Extension

Composer

6. Enable the Pull From Composer option in case you use git.

Note: once you enable this option the extension will run the composer install command to get a new code via composer during deployment.

7. Enter the Composer CLI Command.

Note: depending on your environment you can choose some specific composer CLI commands.

e.g. php -dmemory_limit=-1 /ysr/bin/composer or composer --ignore-platform-reqs or composer.phar

Magento 2 Zero Downtime Deployment via Composer

Git

8. Enable the Pull From Git option in case you use Git. Once you enable this option the extension will run a command to pull the new code from your git repository during the deployment.

9. Specify the Git Branch To Pull From.

10. Choose whether you want to Enable Webhooks.

11. Enter the Webhooks Secret. Please enter some random characters in the "Secret Key" field and use this URL in Git settings for Webhooks after you save the config. 

Note: you can configure Github, GitLab or Bitbucket webhooks to automate the deployment process.

Zero Downtime Deployment via Git

Once you finish with the configuration don't forget to Save Config and enjoy the deployment with no website performance interruptions. 

You can also check how easy it is to install the extension without website interruptions in this video. We go through all steps, one by one, to show you how Magento 2 Zero Downtime Deployment extension works.

Excited to use it already?

To start with, you can check the most basic zero downtime deployment commands to use deploying your Magento 2 store!