How to Install Magento 2 in 2024: The Complete Guide

Magento 2 (Adobe Commerce)is one of the most powerful and flexible eCommerce platforms available today. For small businesses setting up their first online store, to larger operations that need to build on what they’ve got, Magento 2 offers the tools and scalability to grow alongside your business.

However, knowing exactly how to install Magento 2 is not always easy. With multiple installation options available and usually a long list of technical requirements to meet, it can be hard to navigate the best way to begin the installation process.

With this in mind, here we’ll walk you through everything you need to know to install Magento 2 in 2024, whether you prefer the command-line control of Composer or the simplicity of a one-click installer.

What Do You Want To Know?

What Do You Need to Install Magento 2?

How to Install Magento 2 Using Composer in Six Steps

How to Install Magento Using Web Setup Wizard or One-Click Installers

What Do You Need to Do After Installing Magento?

Envisage Digital: Your Trusted Magento Partner

Im 01 | Envisage Digital

What Do You Need to Install Magento 2?

Before installation can begin for your Magento 2 software, there are certain prerequisites that need to be in place to ensure that everything runs smoothly. These can largely be placed into two categories: the system requirements you’ll need, and the tools you’ll need to implement the installation.

What System Requirements Do You Need to Have for Magento 2?

In order to begin your Magento 2 installation, you’ll need a reliable server and specific technical specifications to run efficiently.

Here's the system requirements you'll need to meet in order to install Magento 2:

  • Operating System: Linux x86-64 (such as Ubuntu or CentOS)
  • Web Server: Apache 2.4 or Nginx 1.x
  • Database: MySQL 8.0 (or MariaDB equivalent)
  • PHP Version: PHP 8.1 or 7.4 (While PHP 8.1 is the recommended version, PHP 7.4 is still supported)
  • PHP Extensions:
    • bc-math
    • ctype
    • curl
    • dom
    • gd
    • hash
    • intl
    • json
    • mbstring
    • openssl
    • pdo_mysql
    • soap
    • xml
    • xsl
    • zip
    • libxml
  • Memory: Minimum 2GB of RAM (although 4GB+ is recommended for better performance)
  • Disk Space: At least 10GB of free disk space for the installation, though more may be required depending on your store's size.
  • SSL Certificate: Required for HTTPS, particularly in a production environment.
Im 02 | Envisage Digital

What Tools Do You Need to Install Magento?

Once your system meets these technical requirements, you’ll also need several tools to successfully install Magento 2. Note that not all tools will be required for every installation, as some are situation-specific.

Generally, the tools you’ll need include:

  • Composer (for a command-line installation): this is a dependency management tool for PHP. It will automatically install and manage all necessary Magento libraries and components. It’s generally the recommended method for installing Magento 2.
  • Access to a Web Hosting Account: Your hosting environment must meet the system requirements for Magento 2. A quality host can offer tailored Magento environments with easy one-click installers for Magento 2.
  • MySQL Database: You’ll need to create a MySQL database and user on your hosting account before installation. Tools like phpMyAdmin, or host-specific tools, can simplify this process.
  • FTP Client or File Manager: If you're not using Composer, you'll need an FTP client like FileZilla or your hosting provider's File Manager to upload Magento files to the server.
  • Command-Line Access (SSH): For a Composer-based installation, you’ll need access to SSH to run commands that install Magento’s dependencies and set up your store.
  • Magento Software: You can download Magento from the official site or use Composer.

Using these tools, and adhering to these system requirements, means you’ll be in the best position to install Magento 2.

Im 03 | Envisage Digital

How to Install Magento 2 Using Composer in Six Steps

Step 1: Install Composer on Your Server

The first step of installing Magento 2 with Composer is to install Composer by downloading and running the installation file.

Then, move it to a directory in your $PATH, and verify installation.

Step 2: Create a Project Directory for Magento 2

The next step is to create a directory on your server where Magento will be installed. An example of this would be ‘magento2’.

Step 3: Download Magento 2 Using Composer

Then, you can use Composer to download Magento 2 by running:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

You’ll need to log in with your Magento Marketplace Public Key (as the username) and Private Key (as the password).

Step 4: Set Up the Database

Step four involves creating a MySQL database for Magento.

Configure Magento to connect to the database by entering your database details (hostname, database name, user, and password).

Step 5: Run Magento Installation

Run the Magento installation script, setting up details like:

  • Admin username and password
  • Admin email
  • Store URL
  • Admin panel URL (customisable for security)

Step 6: Verify Installation

After installation, check the URLs for your store and admin panel to confirm Magento 2 is installed:

  • Your storefront URL: http://yourdomain.com
  • Admin panel URL: http://yourdomain.com/admin
Im 04 | Envisage Digital

How to Install Magento Using Web Setup Wizard or One-Click Installers

For those who are not so familiar with command-line interfaces, or simply want to make things move quicker, you can set up Magento using Web Setup Wizard or One-Click Installers. These tools will handle many of the technical requirements for you.

Step 1: Log Into Your Hosting Control Panel

The first step for installing Magento 2 using Web Setup Wizard or One-Click Installers is to log into your hosting control panel. Here, you can access your hosting provider’s control panel (cPanel, Plesk, or similar).

You can look for One-Click Installers or Magento Installer under the Software section.

Step 2: Select Magento from the Software Options

Next, in the One-Click Installer, find Magento under the list of available applications.
Click Install to begin the installation process

Step 3: Configure the Installation Settings

Should you have specific needs for Magento 2 installation, you can set the following options during the setup:

  • Domain Name: Choose the domain or subdomain where Magento will be installed.
  • Directory Path: Set the directory path where you want Magento to be installed. Leave blank if you want it installed in the root directory.
  • Admin Username/Password: Create credentials for the admin panel.
  • Email: Enter an email address for administrative communication.

Step 4: Configure the Database Settings

As well as the installation settings, you can also configure the database settings to fit your needs.

The wizard will automatically create a MySQL database for your Magento 2 store, or prompt you to create one manually.

  • Database Name: You can leave this auto-generated or change it.
  • Database User/Password: Either accept the auto-generated credentials or input your own

Step 5: Complete the Installation

Once you have reviewed all the settings, click Install. The installer will automatically download and configure Magento on your server.

Step 6: Verify Installation and Access Your Store

Just as when using Composer to install Magento 2, after the installation completes, check the following URLs to ensure everything is working:

  • Your Storefront URL: http://yourdomain.com
  • Admin Panel URL: http://yourdomain.com/admin

Use the admin credentials you created to log into your Magento admin panel and start configuring your store.

Im 05 | Envisage Digital

What Do You Need to Do After Installing Magento?

So, you’ve got to the stage where Magento 2 is installed according to your specifications. But, that isn’t the end of the story - you have to ensure that every element of your installation is not only working but is secure and optimised.

For instance, to bolster the security of your store, you’ll want to customise the admin panel URL and enable security measures like two-factor authentication. This will help protect the site from potential security threats.

From a usability perspective, you’ll also want to ensure that the store's default currency, language, and timezone match your target market.

Then, you’ll want to set up your store’s catalogue. Add your products, set prices, create categories, and ensure everything is organised properly for easy navigation. Make sure you configure shipping methods, taxes, and payment gateways so customers can make purchases smoothly.

As soon as you begin operating, it’s helpful to imagine yourself as a customer. Browse the site and place test orders, and check that all functionality works as expected.

Remember, though, that optimising your store is a continual journey. That’s why it’s important to regularly test every element of your site, even when you’re fairly certain that everything is as it should be.

Im 06 | Envisage Digital

Envisage Digital: Your Trusted Magento Partner

Unleash the full potential of your Magento store with Envisage Digital's expert team. We provide a comprehensive range of Magento services, from cost-effective integrations and extensions to complex custom development.

Our specialists can guide you through every stage of the process, from ideation to delivery and aftercare. Contact Envisage Digital today for a free consultation and discover how we can transform your Magento store into a thriving online success story.

Envisage Digital are your partner for all things Magento. Our comprehensive Magento services include tailored Magento development, seamless migrations, and strategic upgrades to keep your store at the cutting edge.

What’s more, our expert developers specialise in helping integrate your store with third-party systems, and perform code audits to ensure your site is running as smoothly as possible.

Get in touch with us today to explore how we can take your Magento store to new heights.

Im 07 | Envisage Digital

Our Services

Latest Posts

Google Rating
5.0
Based on 30 reviews
×
js_loader