Step 1

Backup code and database

Step 2

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

Step 3

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

Step 4

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

Step 5

in composer.json file add
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
to autoload psr-4 section

Step 6

composer update

Step 7

sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo n98-magerun2.phar cache:clean && sudo n98-magerun2.phar cache:flush && sudo chmod 777 var -R && sudo chmod 777 pub -R
php bin/magento cache:clean && php bin/magento cache:flush && sudo chmod 777 var -R && sudo chmod 777 pub -R

Possible issues

Issue - no matching package found

     [Composer\DependencyResolver\SolverProblemsException]                                                                               
    Problem 1                                                                                                                         
      - klarna/module-core 4.4.5 requires guzzlehttp/guzzle ^6.0 -> no matching package found.                                        
      - magento/product-community-edition 2.2.6 requires klarna/module-core 4.4.5 -> satisfiable by klarna/module-core[4.4.5].        
      - Installation request for magento/product-community-edition 2.2.6 -> satisfiable by magento/product-community-edition[2.2.6].  
  Potential causes:                                                                                                                   
   - A typo in the package name                                                                                                       
   - The package is not available in a stable-enough version according to your minimum-stability setting                              
     see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.                                               
  Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.       


Fix

composer require guzzlehttp/guzzle:6.5.x-dev 


or

# php -f dev/tools/UpgradeScripts/pre_composer_update_2.3.php -- --root=/var/www/vhosts/PATH_TO_YOUR_SITE/htdocs --repo=https://repo.magento.com/


You can get pre_composer_update_2.3.php from Magento 2.3x installation.
Then run composer update.





Issue - missing product images because of cache

404 (Not Found) on pub/media/catalog/product/cache

Fix

Delete cache folder from ⁨pub⁩/⁨media⁩/⁨catalog⁩/⁨product⁩/cache
Regenerating the cache folder using: php bin/magento catalog:image:resize