Upgrading Mag 2.3 to 2.4

Hi Craig,

I know you get to this but can you please tell me in short how to upgrade Mag from 2.3 to 2.4

My current server: ubuntu 18.04, php7.3,21 MySQL 5.7.31, ElasticSerach 7.6,

I’m guessing I need to start with upgrading my PHP to 7.4 runnings:

sudo apt-get install php7.4 libapache2-mod-php7.4 php7.4-mysql php7.4-soap php7.4-bcmath php7.4-xml php7.4-mbstring php7.4-gd php7.4-common php7.4-cli php7.4-curl php7.4-intl php7.4-zip zip unzip -y

Then I need to upgrade my SQL to 8.0. Can you please give me a tip on to do it?

Update my “date.timezone" in php.ini. This is something new for Mag 2.4.

And finally upgrade my magento with the following:
(This procedure was for upgrading Mg 2.3. to 2.3.4 but I may work :thinking:)

bin/magento maintenance:enable
composer require magento/product-community-edition=2.4.0 --no-update
composer update
bin/magento cache:clean
rm -rf var/cache/* var/page_cache/* generated/code/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy en_US -f
bin/magento cache:clean
bin/magento maintenance:disable

Disclaimer: I haven’t tested any of this

Upgrade Ubuntu

Upgrade OS from old to latest with:

sudo apt update
sudo do-release-upgrade

You may need to do sudo apt update after to update the Repos of the new OS.

Upgrade PHP

Install necessary modules (don’t forget php7.4-gettext for phpMyAdmin)

sudo apt-get install php7.4 libapache2-mod-php7.4 php7.4-mysql php7.4-soap php7.4-bcmath php7.4-xml php7.4-mbstring php7.4-gd php7.4-common php7.4-cli php7.4-curl php7.4-intl php7.4-zip php7.4-gettext zip unzip -y

Then update new config files

sudo nano /etc/php/7.4/apache2/php.ini

Switch to new PHP version and confirm (Method 1)

sudo a2dismod php7.2
sudo a2enmod php7.4
systemsctl restart apache
php -v

If PHP version does not update, do this (Method 2)

sudo update-alternatives --config php

Upgrade MySQL

This might work ok but really not sure. I have a feeling that I ran into issues doing this in the past due to some conflict. But who knows…

sudo apt upgrade mysql-server

Upgrade phpMyAdmin

Update phpMyAdmin to be compatible with latest MySQL and PHP upgrades

sudo apt upgrade phpmyadmin

Upgrade Elasticsearch

Yet to research…

Upgrade Magento

Just ref the post you already linked

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.