How to Install Magento 2 on a Localhost Using XAMPP

How to Install Magento 2 on a Localhost Using XAMPP

Introduction

Magento is a robust e-commerce platform that offers a plethora of incredible features. It’s a powerful e-commerce content management system that supports hundreds of thousands of online stores across the web. Every time a new version of this platform pops up, many people grab the opportunity and rush to install it on web hosting providers or localhost.

Installing Magento 2 on a local host can be a daunting experience for developers as it presents numerous hurdles. It requires a lot of tweaking and server configurations as well as the tiresome setup of the composer. One way of evading these complexities when installing Magento 2 on your localhost, is the use of XAMPP. The Cross-platform, Apache, MariaDB, PHP and Perl (XAMPP)  is a free and open-source Apache distribution that contains PHP, MariaDB database, and Perl. It is an easy-to-install, platform-agonistic web server solution pack that makes it easy for users to craft local web servers for deployment purposes.

This tutorial will help you Install Magento 2 on a local host using XAMPP.

Ready? Let’s get started!

Prerequisites

Before we proceed, make sure you have the following:

  • XAMPP installed in your PC
  • Magento 2 Downloaded

Besides, Magento 2 installation requires the following:

  • PHP 5.5x or 5.6x
  • Apache 2.2 or 2.4
  • MySQL 5.6x

If you have all the above requirements in place, let’s proceed with the installation.

Step 1-
Setting The Stage

  • Open XAMPP server and start both MySQL and Apache applications. The background color of these services will be green when they open successfully.

How to Install Magento 2 on a Localhost Using XAMPP

  • Extract your Magento 2 files in the htdocs folder of your XAMPP server.

Step 2 –
Installing The Composer

Our Magento 2 installation will be facilitated by the composer. The composer makes it easy to manage the core Magento attributes including its extensions, their dependencies, as well as the entire Magento system. Its an incredible tool built for effective dependency management in PHP. The tool enables you to declare the libraries to be leveraged by the project and controls install/update aspects for you.

  • To install and configure the composer, first download, then run composer-setup.exe.This will automatically install the latest version of composer and create the PATH to help you call “composer “ from any directory in the command line.

How to Install Magento 2 on a Localhost Using XAMPP

  • This will take you to a new page. Select Install Shell Menus and click Next.

How to Install Magento 2 on a Localhost Using XAMPP

  • Next, the installation will need a php.exe path to continue the setup. Click Browse to provide the directory of the folder containing the php.exe.

How to Install Magento 2 on a Localhost Using XAMPP

  • Select the php.exe folder, and click Open to continue.

How to Install Magento 2 on a Localhost Using XAMPP

  • Click Install in the subsequent window to kickstart the installation.

How to Install Magento 2 on a Localhost Using XAMPP

  • Next, click Install to finalize the installation.

How to Install Magento 2 on a Localhost Using XAMPP

  • That’s it! The composer is fully installed but not enabled. To enable the extension, uncomment the line “extension=php_intl.dll” and remove the semicolon from the start of that line. Restart your XAMMP server.
  • Next, locate the Magento 2 folder in the htdocs folder. Long press the shift key, right click, then select Open command window here. This will open the command prompt on location.
  • Run the command “composer install” in the command prompt to install your Magento 2 application on the localhost.

Note: If the command prompt gives the error below, locate the Magento 2 directory, right-click the composer.lock file then select composer update.

How to Install Magento 2 on a Localhost Using XAMPP

This will give you the desired results

How to Install Magento 2 on a Localhost Using XAMPP

  • Get verified developer’s username and password from Magento.com, then click MyAccount. Under the developer tab, select Secure Keys, to generate the authentication keys.

How to Install Magento 2 on a Localhost Using XAMPP

  • The Public key is the Username whereas the Private key is the password. Next fashion an empty database featuring the correct permissions in phpmyadmin.

How to Install Magento 2 on a Localhost Using XAMPP

Step 3 –
Installing Magento 2

  • Enter the Magento 2 URL with the prefix localhost. For example; localhost/magento2-developer/setup*/landing and click Enter. This will take you to a new page, click Agree and Setup Magento to continue.

How to Install Magento 2 on a Localhost Using XAMPP

  • This will take you to the Magento Installer page. Click Start Readiness Check to initiate the installation.

How to Install Magento 2 on a Localhost Using XAMPP

This will prompt the installer to check the installation environment for readiness. Once the check is complete, click Next to proceed.

How to Install Magento 2 on a Localhost Using XAMPP

  • Enter the correct Database credentials that you created in the previous step, then click Next to continue.

How to Install Magento 2 on a Localhost Using XAMPP

  • Next, enter the web configuration details such as admin URL, store URL, https option, and Apache rewrites, then click Next.

How to Install Magento 2 on a Localhost Using XAMPP

  • The next step is Customizing your store. Here you will be required to set the Currency, Timezone, and language

How to Install Magento 2 on a Localhost Using XAMPP

  • The next step is Creating Admin Account. Enter the back-end admin credentials including email, Username, and password to complete the account setup, then click Next

How to Install Magento 2 on a Localhost Using XAMPP

  • By now, you Magento 2 application is ready for installation on your localhost. Click Install Now to implement the platform.

How to Install Magento 2 on a Localhost Using XAMPP

This will start the installation

CAUTION: Do not close the browser until the setup is 100% complete.

How to Install Magento 2 on a Localhost Using XAMPP

  • Once the installation is complete, you’ll get the following success page. Click Launch Magento Admin to log in to the backend.

How to Install Magento 2 on a Localhost Using XAMPP

  • Enter the admin credentials, and click Sign In.

How to Install Magento 2 on a Localhost Using XAMPP

  • Give it time, then open the homepage

How to Install Magento 2 on a Localhost Using XAMPP

Conclusion

Congratulations! You have successfully installed Magento 2 on localhost using XAMPP. You can now access the admin area and the front-end of your store to explore the exciting features of Magento 2.

 

Check out the top 3 Magento hosting services:

Kamatera
£3.07 /mo
Starting price
Visit Kamatera
Rating based on expert review
  • User Friendly
    3.5
  • Support
    3.0
  • Features
    3.9
  • Reliability
    4.0
  • Pricing
    4.3
Hostinger
£2.29 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
Ultahost
£1.92 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8

How to Set Up SSL/TLS Encryption on Magento

This article shows you how to set up SSL/TLS (HTTPS) encryption on Magento.
less than a minute
Vladimir Rakov
Vladimir Rakov
Hosting Expert

How to Install Magento In Cpanel

Magento is an Open Source e-commerce web application. We will show users how to
less than a minute
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How To Send Email In Magento 2?

This tutorial will help you create and send custom email using email template Ma
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

How to Fix a Slow Magento 2 Website

A lot of merchants are frustrated with the sluggish performance of Magento 2 web
less than a minute
Md. Ehsanul Haque Kanan
Md. Ehsanul Haque Kanan
Hosting Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top