I decided to write this, to show that we’re all human and even I get stuck and frustrated.
What I’m up to
So, I allocated the morning to write up a set of procedures and document any issues when upgrading my main project from 2.2.11
to 2.3.4
. It’s been over 4 hours and I’ve already had to overcome so many challenges, which are unique to my setup (based on what I’m running, what I have installed and what custom development has previously taken place).
Visualising my morning…
I’ve no doubt if you’re reading this then you know what I’m talking about. Here’s a video that best visualises my morning (every switch I flick is a problem solved)…
Considerations and hurdles
Anyway, here are some headlines of things that I hadn’t really considered - Which resulted in stumbling blocks:
- You can’t always switch PHP versions using
a2enmod
anda2dismod
. You can also usesudo update-alternatives --config php
. - When upgrading PHP, ensure to change the
memory_limit
of the master php.ini file back to something useful like “2G”. (What’s with the128MB
default!!!) - Ensure that all 3rd party modules are up-to-date and support the latest Magento version before attempting to upgrade Magento. Do this ahead of time to help eliminate the amount of work that needs doing in one go (Plus it’s easier to identify where issues would have came from)
- It’s definitely simpler using the
M2.2.x
>M2.3.x
upgrade script rather than doing everything by hand (How to upgrade from Magento 2.2.8 to 2.3.1) - I’m glad I run this forum as there are posts I’ve written that I’ve had to reference cause I forgot how to do stuff (like the one above)
- Be prepared to face issues that you won’t find the answers to on Google. Every store has it’s own problems. A key skill is knowing how to investigate and track down leads
- Watch out for the Catch-22 scenario… You can’t upgrade Magento without upgrading a 3rd party module… But you can’t upgrade the 3rd party module until you upgrade Magento. That’s a fun one! (Tip: use
composer remove <module>
on troublesome 3rd party modules and reinstall them again after the upgrade.) - If you migrated data from 1.x to 2.x several years ago, be prepared to face some more of those annoying migration ghosts
- Don’t forget to patch your theme! 3 of my issues came from missing 3 patches.
- Take your time. When you get frustrated take a time out. Perhaps write a post about it
- Write everything down
Streamlining / The goal
As I document all of these issues, what I tend to do with this information is rollback my Development Server back to just before I started and then do the whole process over and over and over again until:
- I’ve streamlined the process to the least amount of steps possible
- The process results in no errors
- I’m comfortable following my only guidelines when I come to apply this in Production.
Anyway, time to crack on