Easy way to download magento 2 on cloud server

Avatar image of Maarten Maarten
April 20, 2023
here is a simple way to download Magento 2 on a cloud server: Choose a cloud server provider and create a new instance of the server with your desired configuration. Connect to your server via SSH using a terminal program like PuTTY (for Windows) or Terminal (for Mac). Install the required packages and dependencies using

here is a simple way to download Magento 2 on a cloud server:

Choose a cloud server provider and create a new instance of the server with your desired configuration.

Connect to your server via SSH using a terminal program like PuTTY (for Windows) or Terminal (for Mac).

Install the required packages and dependencies using the following command:

sql

sudo apt-get update
sudo apt-get install apache2 mysql-server php libapache2-mod-php php-mysql php-xml php-intl php-curl php-mbstring git

Navigate to the root directory of your server by running the command:

bash

cd /var/www/html/

Download the latest version of Magento 2 by running the following command:

bash

sudo git clone https://github.com/magento/magento2.git

Change the owner and group of the Magento directory to the web server user (usually www-data) using the following command:

kotlin

sudo chown -R www-data:www-data /var/www/html/magento2/

Create a new database for Magento 2 by running the following command:

sql

mysql -u root -p
CREATE DATABASE magento;
GRANT ALL PRIVILEGES ON magento.* TO 'magento'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;

(Note: Replace ‘password’ with a secure password of your choice)

Navigate to the Magento 2 root directory and run the following command to install Magento 2:

perl

php bin/magento setup:install --base-url=http://your-domain.com/ --db-host=localhost --db-name=magento --db-user=magento --db-password=password --admin-firstname=admin --admin-lastname=admin --admin-email=admin@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1

(Note: Replace ‘your-domain.com’ with your domain name and ‘password’ with your MySQL password)

That’s it! You should now have a working installation of Magento 2 on your cloud server.

Industry news straight to your inbox

Get the latest commerce news, trends, and strategies to grow your business
Subscribe to the newsletter
By submitting this form, you agree to receive promotional messages from Magstack. Unsubscribe any time by clicking the link in our emails.
Select location and language

Contact Our Sales Team

Learn more about our products, features, and pricing options.
By submitting this form, you agree to receive promotional messages from Shopify about its products and services. You can unsubscribe at any time by clicking on the link at the bottom of our emails.
Product
Pricing
Use cases
Recourses
Documentation
Log in
Start a free trial