2.14.13.1. Install Magento 2.3.7

Attention!

It is not possible to install Magento version 2.4.0 or higher on the hosting, since they require the Elasticsearch module, which is not supported on the hosting.
  1. Install PHP 7.3 for the site and for the console (see official requirements).
  2. In the "PHP settings" section, disable the psr extension.
  3. Download the archive with Magento 2.3.7 distribution from official repository on GitHub.
  4. Place the distribution files on the hosting:
    1. Using the file manager or any FTP client, upload archive to the hosting in root directory of the site.
    2. Extract the uploaded archive and place its contents so that they end up in the site root directory.
    3. Edit two .htaccess files — in root directory of the site and in pub subdirectory (or replace their contents with those taken from here):
      1. Find the following line:
        Options +FollowSymlinks

        Replace it with following:

        Options +SymLinksIfOwnerMatch
      2. Find all such code blocks:
        <IfVersion < 2.4>
            order allow,deny
            deny from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all denied
        </IfVersion>

        Replace each of them with this line (or comment out all lines in them except this one):

        Require all denied
  5. Prepare database:
    • If there is no free database, create a new one.
    • If there is an unused database, you can clear it and use it.
  6. In MySQL access restrictions, disable IP-based access restriction. Without this, Magento will not allow you to continue installation and will report that the user has insufficient permissions.
  1. Connect to the hosting via SSH.
  2. Go to the root directory of the site (instead of example.com/sub specify your own data):
    cd ~/example.com/sub
  3. Download Composer 1.9.0 and make it executable:
    wget https://getcomposer.org/download/1.9.0/composer.phar && chmod +x composer.phar && mv composer.phar composer
  4. Install the dependencies:
    ./composer install
  5. Install Magento (substitute your own data in the command parameters):
    bin/magento setup:install \
    --base-url=http://example.com/ \
    --db-host=example.mysql.tools \
    --db-name=example_db \
    --db-user=example_db \
    --db-password='password' \
    --admin-firstname=admin \
    --admin-lastname=admin \
    --admin-email=admin@example.com \
    --admin-user=admin \
    --admin-password='password' \
    --language=uk_UA \
    --currency=UAH \
    --timezone=Europe/Kyiv \
    --use-rewrites=1

    In command (a description of all parameters is available in the official documentation):

    • base-url — the address at which the site will operate.
    • db-hostdatabase host.
    • db-namedatabase name.
    • db-userdatabase user login.
    • db-passworddatabase user password.
    • admin-firstname — administrator's first name.
    • admin-lastname — administrator's last name.
    • admin-email — administrator email.
    • "admin-user" — administrator login.
    • admin-password — administrator password. It must be at least 7 characters long and contain at least 1 letter and 1 digit.
    • language
    • currency
    • "timezone"
    • use-rewrites — use of web server redirects for generated storefront and admin panel links.
  6. From "Magento Admin URI" line, copy the address for accessing site admin panel and save it for yourself.
  7. Change administrator password to your own. Without this, logging in to the site admin panel using the previously provided credentials will not work.
  8. Check the site operation.
Content

    (1)