2.13.9.1. Install Magento 2.3.7
Attention!
Magento version 2.4.0 or higher cannot be installed on the hosting, since they require the Elasticsearch module, which is on the hosting not supported.Manual installation
Preparation
- V PHP settings disable psr extension.
- Download from official repository on GitHub archive with Magento 2.3.7 distribution.
- Place the distribution files on the hosting:
- Unpack downloaded archive and place its contents so that it ends up in root directory of the site.
- Edit two file
.htaccess
- in root directory of the site and subdirectorypub
(or replace their contents with the one taken fromhere):- Find a line like this:
Options +FollowSymlinks
Replace it with this:
Options +SymLinksIfOwnerMatch
- Find all such blocks of code:
<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 except this one):
Require all denied
- Prepare the database:
- V MySQL security settings disable restriction of access by IP. Without this, Magento will not allow the installation to continue and will report that the user does not have enough rights.
Installation
- Connect to hosting via SSH.
- 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
- Install dependencies:
./composer install
- Install Magento (substitute your 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 (description of all parameters is available in official documentation):
base-url
- the address where the site will work.db-host
— host Database.db-name
— title Database.db-user
— login database user.db-password
— password database user.admin-firstname
- administrator name.admin-lastname
- Administrator's last name.admin-email
- administrator mail.admin-user
- administrator login.admin-password
- administrator password. Must be at least 7 characters and contain at least 1 letter and 1 number.language
- language.currency
- currency.timezone
- Timezone.use-rewrites
— use of web server redirects for generated storefront and admin panel links.
- Copy from string "Magento Admin URI" address of access to the admin panel of the site and save it for yourself.
- Change administrator password to your own. Without this, logging into the site's admin panel with the previously specified data does not work.
- Check the site is working.