Debian Update Magento 2.2.7 to 2.3.0

requirements for os


First, do the Debian updates/upgrades:
su – 
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

Login again:

cat /etc/os-release


update php

apt-get remove php7.0
apt install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sh -c ‘echo “deb https://packages.sury.org/php/ $(lsb_release -sc) main” > /etc/apt/sources.list.d/php.list’
apt update
apt-get install php7.1 php7.1-common

apt-get install php7.1-curl php7.1-xml php7.1-zip php7.1-gd php7.1-mysql php7.1-mbstring php7.1-mcrypt php7.1-intl php7.1-xsl php7.1-bcmath php7.1-iconv php7.1-fpm php7.1-soap

a2enmod proxy_fcgi setenvif
a2enconf php7.1-fpm
systemctl restart apache2

<=SAVE=>

NOTICE: You are seeing this 


update Magento:

cd <Magento-DIR>

composer require magento/product-community-edition 2.3.0 –no-update

Specify additional packages for composer Run this

composer require --dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 --no-update

composer require –dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 –no-update

Remove unused packages

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

Update autoload

Open composer.json and edit the "autoload": "psr-4" section to include "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/" :

"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/",
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"

composer update

composer require magento/product-community-edition 2.3.0 –no-update
composer update

error with symfony:
composer require –dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 –no-update

Error with sampledata:
./bin/magento sampledata:reset


Error with sampledata:

edit composer.json and remove the sampledata
see: magentosite
try again:
composer update



./bin/magento sampledata:deploy

chown -R www-data .
find . -type f -exec chmod 400 {} \;
find . -type d -exec chmod 500 {} \;
find var/ -type f -exec chmod 600 {} \;
find media/ -type f -exec chmod 600 {} \;
find var/ -type d -exec chmod 700 {} \;
find media/ -type d -exec chmod 700 {} \;
chmod 775 /bin/magento

Updating Magento with CLI

Updating magento with cli can be handled as following:
# set the correct package
composer require magento/product-community-edition 2.2.3 –no-update
composer update
# Manually clear var subdirectories:
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*
#correct rights magento
chmod 770 bin/magento
# Update the database schema and data:
./bin/magento setup:upgrade
# Put your storefront online
./bin/magento maintenance:disable
# Set rights
chown -R www-data:www-data .
chown -R www-data:www-data *.*
chown -R www-data:www-data .*
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;
Problem after updating is that the products won’t show. This is caused by the template.. so just check if the correct version of the template is there …