This is how I would go about this (in a local or dev environment):
PHP
First, activate PHP 7.4 and check if the site still works as it should (frontend, backend). I don't know exactly if version 3.3.4.1 works with PHP 7.4, but it's easier to switch back to an older PHP-version than reverting a Craft upgrade.
Craft
After you've made sure that the site still works, you can start the upgrade to Craft 3.6.11.2. I would kindly but strongly suggest that you use Craft's command line commands for this. In our experience, this gives you more detailed error messages.
- First, make a backup of both your files and database (create a server snapshot, or manually create a backup)
- Now, open a terminal. Don't be scared, you'll love it. Or not, depending on the outcome of this experiment.
- Navigate to your project's root folder.
- Run
./craft update
<-- This will run the craft
script in the current folder (./
) and then it tells Craft to run the update
command. This command will only show you what needs to be updated, it will not update anything.
- Now, you should see a list of updates of both Craft and plugins. I'd start by updating Craft itself. Baby steps, you know?
- Run
./craft update craft
<-- This tells Craft to update ... itself. In the background, composer.json
will be changed and Composer will update Craft. If that fails, Craft will tell you why. If something goes wrong, Craft will ask you if you want the changes to composer.json
reverted. If you choose to do this, you can then fix the problem and run the update again. If you don't revert the changes, you can fix the problem and run composer update
. If you update Craft using Composer, you'd still have to run ./craft migrate/all
to run any database migrations that come with newer versions.
- If the update succeeds, you can then
./craft update all
, to update all plugins. This, again, changes your composer.json
file and runs Composer in the background.
Common pitfalls
File or folder permissions
Your vendor folder, your config/project
folder ... Craft needs permission to change things in order to proceed with the update. Check your permissions and try again.
Composer mismatches
A failing update could be Composer throwing an error. For instance, if your composer.json
file explicitly says "Use PHP 7.0", and Craft 3.6 requires PHP 7.2, you'd get an error. In this case, alter composer.json
and try again.
Luck and common sense
Most of the times, Craft updates just work. If they don't, put on your smart hat and try to read the errors that Craft or Composer throws at you. Another great place to look for errors is Craft's log (storage/logs/web.log
). It's much easier to come up with a solution if you know what the problem is. Good luck, and remember ... backup first!