Applicable to:
- Plesk Onyx for Linux
Question
How to install custom Magento version on the domain in Plesk?
Answer
In this example, Magento 2.2.4 is installed on the Centos, Plesk Onyx:
Warning: Plesk does not support the installation which was not performed via Plesk application catalog.
All actions below are performed at your own risk.
Note: For Magento MySQL 5.6 or higher is required. Consider MySQL upgrade according to the articles below:
How to upgrade MySQL from 5.1 to 5.5 on Linux
How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.0/10.1/10.2 on Linux
-
Create the domain
example.com
with system userjohn_doe
. -
Set PHP version to 7.0.X or higher in Domain > example.com > PHP Settings.
-
Set
max_execution_time
as 1800 in Domain > example.com > PHP Settings. -
Set
memory_limit
as 1024M in Domain > example.com > PHP Settings. -
Go Domain > example.com > Databases and create database
magento1
and database usermagento_user
.
-
Connect to the server via SSH.
-
Download Magentonto archive from the https://www.mageplaza.com/download-magento/ (Here Magento 2.2.4 is downloaded):
# wget -O Magento-archive.tar.gz https://codeload.github.com/magento-2/magento-2-community-sample-data/tar.gz/2.2.4
-
Unpack the downloaded archive:
# tar -zxf Magento-archive.tar.gz
-
Copy extracted files into the domain home directory:
# cp -a magento-2-community-sample-data-2.2.4/. /var/www/vhosts/example.com/httpdocs/
-
Go to the domain home directory:
# cd /var/www/vhosts/example.com/httpdocs/
-
Set recommended permissions to files inside:
# find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;
# find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
# chmod u+x bin/magento -
Set necessary ownership for the domain home directory:
# chown -R john_doe:psaserv /var/www/vhosts/example.com/httpdocs/
-
Access domain
http://example.com
and start the Magento installation: -
Add correct database credentials in Step 2 of Magento installation:
-
Continue the installation. Perform the necessary configuration in steps 3-4 of the installation if required.
-
Specify Magento Administrator credentials on Step 5.
-
Press Install Now button on Step 6.
If during the installation the following error occurs:
CONFIG_TEXT: [ERROR] Exception: Warning: SessionHandler::read(): open(/var/lib/php/session/sess_p6pf651vs8u0bnpo122crree32, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/Session/SaveHandler/Native.php on line 22 in /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/App/ErrorHandler.php:61
Then execute the following command:
# chmod 777 /var/lib/php/session/
Comments
0 comments
Please sign in to leave a comment.