How do I upgrade from version 3.8 to new version 4.0 of EE


Hello I have the old version of EE installed as I do to upgrade to new version without having problems.

Here is the version data:

EE 3.8
PHP: 7.0
Ubuntu 14.04.5 LTS
Google Cloud

Migration script broke all sites - really serious but basic script problems