Magento, WordPress and more1 min readUpdated

Upgrade Magento to a new version

The safe order for a Magento or Mage-OS upgrade on Gen2: staging, PHP version, Composer, test, push.

Upgrades are where stores break. Do them on staging, with a backup and a plan to go back.

  1. Check compatibility

    The new version's PHP, OpenSearch and MariaDB requirements, and that your extensions and theme support it.

  2. Create a fresh staging copy

    So staging has today's code and data.

  3. Switch staging's PHP version if needed

    PHP tab of the staging application (PHP versions).

  4. Upgrade with Composer on staging
    composer require magento/product-community-edition=2.4.8 --no-update
    composer update
    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento setup:static-content:deploy -f
    bin/magento cache:flush

    For Mage-OS use its own package name and version.

  5. Test everything

    Checkout with each payment method, emails, the admin, imports and integrations.

  6. Upgrade live

    In a quiet hour: switch live's PHP version if needed, then push files from staging and let the deploy run setup:upgrade. Or repeat the upgrade on live from Git.

Never push the staging database to a live store to finish an upgrade: orders placed meanwhile would be lost. setup:upgrade on live updates its own database.

We do Magento upgrades for you with support hours, including extension fixes.

Did this solve it? If not, tell us what you see and we look at your server.

Open a ticket

Still stuck? Ask a person.

Tickets go straight to the engineers who run ShopWhizzy servers. Tell us the store, what you see and when it started, and we take it from there.