Magento 2.2.X Development and Upgrades

created May 3, 2018, last updated May 3, 2018.

closeThis post was last updated 4 years 7 months 20 days ago, some of the information contained here may no longer be actual and any referenced software versions may have been updated!

Today (2nd May 2018) Magento released Magento CE 2.2.4. Recently the Magento Devs have been pretty busy pushing out 2.2.x updates and Magento 2 is maturing nicely. I am still getting to grips with Magento 2 and don’t expect to release a live site for at least another year so it makes sense to develop with the latest version of Magento. My Magento 2.2.x development environment is built on Docker and installing new Magento 2 dev shops is a breeze:

  1. git clone
  2. cd docker-magento2-2/magento
  3. edit .env
  4. docker-compose build
  5. docker-compose up -d

Upgrading Magento is always a scary experience – Magento 2 is even more terrifying so I recommend you get used to doing updates with your dev systems. If you are manually upgrading from a previous 2.x version, you can use composer within the docker container:

  1. Take a backup
  2. Enter maintenance mode
  3. edit compose.json
    1. change version
  4. flush redis
    1. redis-cli flushall in the redis containers
  5. composer update
  6. rm -rf var/cache/* var/page_cache/* var/generation/* var/di/*
  7. chmod +x bin/magento
  8. php bin/magento cache:flush
  9. php bin/magento setup:upgrade
  10. php bin/magento indexer:reindex

If the upgrade breaks any sample data reinstall with php -f bin/magento sampledata:deploy

I regularly update my Magento 2 docker containers with each version update check them out at


This site uses Akismet to reduce spam. Learn how your comment data is processed.