Categories: Magento 2 Tutorials

How to Install Magento 2 on Localhost Using XAMPP

Magento 2 is a powerful ecommerce platform loaded with an arsenal of useful features. There are hundreds of thousands of ecommerce stores built on the popular ecommerce CMS. However, many people face issues in installing Magento on localhost using XAMPP. In this tutorial, I am going to teach you how to install Magento on localhost. Magento is releasing updated versions of Magento 2 day-by-day. Hence, I am going to configure Magento 2.2.6 on my localhost using XAMPP for this tutorial.

Requirements

  • Apache 2.2 or 2.4
  • Download XAMPP
  • PHP 7.0.13–7.0.x, 7.1.x.
  • MySQL 5.6, 5.7
To read more requirements, click here.

Get $25 Free Credit on Managed Magento Hosting!

Use Coupon: MGT25

Download and Extract Magento 2

Go to the Magento official website and download Magento 2 setup. Now go to xampp/htdocs and create the directory ‘magento.’ Extract the Magento 2.2.6 archive in xampp/htdocs/magento.

Update PHP (php.ini)

Now open your XAMPP Control Panel. Click on Apache’s Config and then navigate to PHP (php.ini). Now search for extension=php_intl.dll and extension=php_xsl.dll, and remove the semicolon “;” at the beginning from both. Start the Apache and MySQL services from XAMPP control panel.

Install Magento 2 on Localhost

Now its time for Magento installation on XAMPP server. Go to phpMyAdmin and create a database with the name magento2. Open the web browser and explore localhost/magento. Then click on Agree and Setup Magento. The first step for installing Magento 2 on localhost is to perform a Readiness check. After successful checking, click on Next. Now the database configuration page will appear. Here, enter database details and database name which will be the same as the one you created in phpMyAdmin (magento2). After completing this step, click on Next. Now complete the web configuration, your store, and admin panel address. After web configuration, click on Next. Now customize your store and click on Next. Create an Admin account and click on Next. All ready! Just hit the Install Now button. Open your store by exploring localhost/magento and you will see the following result: Open your admin panel by exploring localhost/admin and the following screen will appear: Note: If the following error appears on accessing the admin panel, just go to xampp/htdocs/magento/var/cache and delete all the folders from it.

Want to test your website before making it live?

Assure your entire website functionalities are up and running smoothly by testing it on a staging server.

Final Words:

After following the steps above, you should be able to install Magento 2 on localhost using XAMPP. Now start adding the products and explore the awesome features of Magento 2. If you have any questions about the tutorial above or would like to share your thoughts, just leave a comment below.
Syed Muneeb Ul Hasan

Syed Muneeb Ul Hasan is an expert in PHP and Magento, he prefers to educate users in implementing and learning Magento. When not working, he loves to watch cricket.

View Comments

    • Please remove the following:

      pub/static
      var/cache
      var/composer_home
      var/generation
      var/page_cache
      var/view_preprocessed

      • I have done all this. But in windows under xampp magento2.1.1 with composer running dead slow.
        Dashboard icons not displaying properly.
        I have to wait 1-2 minutes after clicking any dashboard icon to get response out of it.
        Please suggest the solution.
        I have also change as you suggested in php.ini file.

  • Dear Brother,

    appreciated your work and very useful information. Right now after installation of magento, facing admin page issue. when I am going to localhost/magento or 127.0.0.1/magento but not getting admin login page. what can i do to resolve ?

    • when i am going on 127.0.0.1/magento/index.php/install page is directing on my domain does that means magento has been installed ?

      • Thanks for your appreciation.

        1. To access admin panel, enter localhost/magento/admin in the web browser.
        2.You mean that it is redirecting to the homepage of your Magento store?

  • Thank you buddy, it really helps me a lot. However, I have a problem that I failed the readiness check due to a lack of php extension missing. I do not have PHP Extension soap, how to fix this problem. Do I need to download the .dll?

  • I am having an issue which seems to be common and no answers I have found actually work. None of the links in the admin section work. Cannot open system, stores etc. Any ideas?

  • Dear Brother..

    I appreciated your information regarding MAGENTO.. Now i have installed successfully but i am facing an error of CRON Job.. kindly advise how to rectify that issue.

Share
Published by
Syed Muneeb Ul Hasan

Recent Posts

Building Employee Trust and Dedication – A Complete Guide

In the highly competitive modern workplace, trust, and employee loyalty are crucial factors for long-term… Read More

3 months ago

12 Winning Strategies for Small Businesses Marketing

In the ever-evolving world of small business developing and implementing effective marketing strategies is critical to… Read More

3 months ago

Top 10 App Development Companies in Dubai 2024

With one of the highest internet penetration rates, the UAE has set out to revolutionize… Read More

3 months ago

Transforming Industries: How Amazons GPT44X is Revolutionizing AI Technology

Artificial Intelligence (AI) has been continually evolving, leading to remarkable advancements in various industries. Among… Read More

8 months ago

Top Magento 2 Extensions for 2023

Extensions, extensions and lots of extensions. We all love extensions, don’t we? After all, extensions… Read More

11 months ago

Unleashing the Power of Software Testing: Cooperating with a Testing Firm

Software quality is crucial to a firm's success across industries in the quickly changing digital… Read More

11 months ago