How to install Magento2.4.2 via ISPconfig in Ubuntu20

1. Introduction

This guide will show you how to install Magento 2.4.2 via ISPconfig in Ubuntu 20.

2. Install PHP Extensions and the Composer Tool

composer installation
curl -sS | sudo php -- --install-dir=/usr/local/bin --filename=composer
PHP extension installation:
apt install php-bcmath php-amqplib

3. Install Elasticsearch

sudo apt update
sudo apt install apt-transport-https ca-certificates wget
wget -qO - | sudo apt-key add -
sudo sh -c 'echo "deb stable main" > /etc/apt/sources.list.d/elastic-7.x.list'
sudo apt update
sudo apt install elasticsearch
sudo systemctl enable --now elasticsearch.service
curl -X GET "localhost:9200/"

4. Deploy a Magento Instance

4.1 Create a Magento website and database via ISPConfig

4.2 Download the Magento 2.4.2 Files

You can download it from the address below: (or download it from the official Magento website)

4.3 Unzip the Magento Files and Put them Under the root directory of the Website

Note: Move the Magento file folder to the root directory of the website, and replace the web directory with the Magento file folder.
chattr -i /var/www/clients/client0/web1
cd /var/www/clients/client0/web1
chattr -i web
rm web -rf
mv /home/administrator/magento/magento2-2.4.2 web(Please replace the file path with the one where your Magento is downloaded)

4.4. Install necessary modules through the composer tool

cd /var/www/clients/client0/web1/web
composer install

4.5. Install Magento through the following commands

(Please replace the field value with your specific value)

./bin/magento setup:install \
--base-url= \
--db-host= \
--db-name=magentodatabase \
--db-user=magento_user \
--db-password=password_of_database \
--backend-frontname=admin \
--admin-firstname=admin \
--admin-lastname=admin \ \
--admin-user=admin \
--admin-password=password_for_admin_user \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1 \
--search-engine=elasticsearch7 \
--elasticsearch-host= \

4.6.Modify the file permissions

cd /var/www/clients/client0/web1/web
chmod 776 /var/www/clients/client0/web1/web -R && chown www-data:www-data /var/www/clients/client0/web1/web -R

4.7 Vefiry a successful installation


Add Feedback