Updating Magento 2.3.x to 2.3.x (via the CLI/Composer)

If you’re here to learn how to upgrade from 2.2.x to 2.3.x then you’ll want to go here: How to upgrade from Magento 2.2.8 to 2.3.1

However, if you’re here to upgrade from 2.3.x to 2.3.x then this is a far simpler task. As I’ve mentioned before in response to a previous post:

In terms of upgrading, the Magento versioning follows this format:

MAJOR.MINOR.PATCH
(e.g. 2.3.1 )

To translate that:

  • MAJOR : Nightmare :scream:
  • MINOR : Pain in the ass :confounded:
  • PATCH : Not so bad :confused:

So, what I’m about to go over can all be found in the Official Magento Documentation (Command Line Upgrade). I’m simply going to strip out some of the more “confusing” stuff that you probably don’t need to worry about as a beginner.

Before you start, you should know that these “simplified” instructions assume that you’re familiar with my previous tutorials on setting up Magento. This is because I go over certain methods that may not apply to you if you’re running a different setup. And remember backup everything up before you start. You should also know that I haven’t tested this yet, but the steps appear correct.

The following commands are all run from the Magento root directory as the “Magento” user.

1. Specify the Magento version you want to upgrade to

composer require magento/product-community-edition=2.3.2 --no-update

2. Specify additional packages

composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.13.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~1.0.0 magento/magento2-functional-testing-framework:~2.3.14 pdepend/pdepend:2.5.2 phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.3.1 --sort-packages --no-update

3. Remove unused packages

composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update

4. Apply Updates

composer update

5. Clear Magento Cache

bin/magento cache:clean

6. Clear Generated Content (Cache)

rm -rf var/cache/* var/page_cache/* generated/code/*

7. Update the Magento Database

bin/magento setup:upgrade