[PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."}

Single-machine deployment

This topic provides instructions for deploying updates to Commerce on a production server using the command line. This process applies to technical users responsible for stores running on a single machine with some themes and locales installed.

Assumptions

  • You installed Commerce using Composer.
  • You are directly applying updates to the server.
WARNING
This guide does not apply if you used git clone to install Commerce.
Contributing developers should use this guide to update their Commerce installation.

Deployment steps

  1. Log in to your production server as, or switch to, the file system owner.

  2. Change directory to the Commerce base directory:

    code language-shell
    cd <Commerce base directory>
    
  3. Enable maintenance mode using the command:

    code language-shell
    bin/magento maintenance:enable
    
  4. Apply updates to Commerce or its components using the following command pattern:

    code language-shell
    composer require-commerce <package> <version> --no-update
    

    package: The name of the package you want to update.

    For example:

    • magento/product-community-edition
    • magento/product-enterprise-edition

    version: The target version of the package you want to update.

  5. Update components with Composer:

    code language-shell
    composer update
    
  6. Update the database schema and data:

    code language-shell
    bin/magento setup:upgrade
    
  7. Compile the code:

    code language-shell
    bin/magento setup:di:compile
    
  8. Deploy static content:

    code language-shell
    bin/magento setup:static-content:deploy
    
  9. Clean the cache:

    code language-shell
    bin/magento cache:clean
    
  10. Exit maintenance mode:

    code language-shell
    bin/magento maintenance:disable
    
recommendation-more-help
386822bd-e32c-40a8-81c2-ed90ad1e198c