×

Learn More

Author Box


Discuss Your Project

About Us

We are Microsoft Gold partner with its presence across the United States and India. We are a dynamic and professional IT services provider that serves enterprises and startups, helping them meet the challenges of the global economy. We offer services in the area of CRM Consultation and implementation, Application development, Mobile application development, Web development & Offshore Development.

magento 2 installation in window os

7 Steps to Install Magento 2 in Windows OS with XAMPP

By Pooja Sharma / December 2, 2020

November 28, 2023
7 Steps to Install Magento 2 in Windows OS with XAMPP

In this section, we are going to install Magento 2 on the Windows platform using the XAMPP server. We need to know about the system requirement that is mentioned below:  

System Requirement for Magento 2

  • Apache 2.2 or 2.4 
  • Download XAMPP 
  • PHP 7.0.13 -7.0.x, 7.1.x, 7.2.x 
  • MySQL %.6,5.7 
  • Browser - Google Chrome, Internet Explorer, or Firefox, etc. 

Step 1: Install XAMPP

  • To Download the 7.2.x version, click here
  • Open and install XAMPP on your Windows 
Magento installation in windows

Install and save it in the drive you wish to keep the file

  • Open your XAMPP Control Panel
  • Click on Apache’s Config and go to PHP (php.ini)
Magento installation in windows
  • Search for extension=php_intl.dll, extension=soap, extension=sockets and extension=php_xsl.dll, and remove the semicolon “;” at the beginning from both. 
Magento installation in windows
  • Start the Apache and MySQL services from the XAMPP control panel. 
Install Magento 2 windows

Also, read: How to add Simple & Configurable Products in Magento 2

Step 2: Install Composer (Optional)

Install Magento 2 windows
  • Browse XAMPP PHP exe file location to install the composer. 

Step 3: Download Magento 2.3.5 setup from the Magento Official website.

Install Magento 2 windows
  • Extract the Download Magento 2.3.5 archive and rename the extracted folder with the name you wish 
  • Copy the renamed folder and past your XAMPP\htdocs location (ex: D:\xampp\htdocs). 
Install Magento 2 windows

Also, read: 4 Effective ways Small Businesses Can Optimize in Magento 2 Store

Step 4: Install Magento 2 (Run localhost open project - localhost/magento)

install Magento 2 xampp windows 10
  • Start Installing (click Start Readiness Check). 
install magento 2 xampp windows 10
  • After click Readiness Check. 
install magento 2 xampp windows 10
  • Click Next and “Add Database” step 2, enter the database details such as server host, username, password, name. 
installing magento on windows
installing magento on windows

Add database name you created in localhost phpMyAdmin then click next. 

  • In the Web Configuration step, enter the store and Magento admin address. Click Next
installing magento on windows
  • Customize Your Store step, enter the details such as time zone, currency, language, and click Next 
installing magento on windows
  • Create an Account step, configure the username, email, and password. Click Next 
installing magento on windows
  • Finally, for the installation step, click Install Now 
installing magento on windows

Also, read: Must use Magento 2 extension for additional functionality

Step 5:  However, the process of installation is incomplete and gives an error

installer magento

Sort the error:

You can replace this function validateURLScheme in File name: \vendor\magento\framework\Image\Adapter\Gd2.php

private function validateURLScheme(string $filename) : bool 
    { 
       $allowed_schemes = [‘ftp’, ‘ftps’, ‘http’, ‘https’];

       $url = parse_url($filename);

       if ($url && isset($url[‘scheme’]) && !in_array($url[‘scheme’], $allowed_schemes) && !file_exists($filename) && strlen($url[‘scheme’]) > 1) { 

       return false;

    } 
    return true;
} 
  • And refresh the window and click install.
  • A success message will be displayed as below after the successful installation: 
installer magento 2

Step 6: Launch the admin panel in the browser

  1. Still if you don’t get any display on the admin dashboard:  
  1. Change URL validator function on  

/vendor/magento/framework/View/Element/Template/File/Validator.php:113 

protected function isPathInDirectories($path, $directories) 
    { 
        $realPath = str_replace(‘\\’, ‘/’, $this->fileDriver->getRealPath($path)); 

        if (!is_array($directories)) { 

            $directories = (array)$directories;
        } 
        foreach ($directories as $directory) { 

            if (0 === strpos($realPath, $directory)) { 

                return true;
            } 
        } 
        return false;
    } 
  1. Refresh page and a dialog box with Magento 2 login screen appear. 
installer magento 2

  • Open Command prompt for running Magento cache clear command.  
  • Go to the Mangento project location directory (D:\xampp\htdocs\magento>) 
  • php bin/magento setup:upgrade 
  • php bin/magento setup:static-content:deploy -f 
  • php bin/magento c:c 
installer Magento 2
installer Magento 2
installer Magento 2

Finally, Magento 2 is successfully installed and is ready to operate on Windows localhost.   

installer Magento 2

Conclusion

In wrapping up these 7 steps to install Magento 2 on a Windows OS using XAMPP, you've embarked on a journey that transforms your computer into a dynamic platform for eCommerce development. As a web developer, this process demystifies the installation, making it accessible for anyone eager to delve into Magento's capabilities.

The straightforward approach outlined here ensures that you're not bogged down by unnecessary complexities. By following these steps, you've not only set up Magento 2 but also gained a foundational understanding of the environment it thrives in.

Now armed with a Magento-powered Windows environment, you're poised to unleash your creativity and build engaging and robust eCommerce solutions. This isn't just an installation; it's the gateway to crafting digital storefronts that stand out in the vast online landscape. Happy coding!

[sc name="Web Development"] [add_newsletter] [add_related_page_diff_contents blog_cat = "web-application"]

In this section, we are going to install Magento 2 on the Windows platform using the XAMPP server. We need to know about the system requirement that is mentioned below:  

System Requirement for Magento 2

  • Apache 2.2 or 2.4 
  • Download XAMPP 
  • PHP 7.0.13 -7.0.x, 7.1.x, 7.2.x 
  • MySQL %.6,5.7 
  • Browser – Google Chrome, Internet Explorer, or Firefox, etc. 

Step 1: Install XAMPP

  • To Download the 7.2.x version, click here
  • Open and install XAMPP on your Windows 
Magento installation in windows

Install and save it in the drive you wish to keep the file

  • Open your XAMPP Control Panel
  • Click on Apache’s Config and go to PHP (php.ini)
Magento installation in windows
  • Search for extension=php_intl.dll, extension=soap, extension=sockets and extension=php_xsl.dll, and remove the semicolon “;” at the beginning from both. 
Magento installation in windows
  • Start the Apache and MySQL services from the XAMPP control panel. 
Install Magento 2 windows

Also, read: How to add Simple & Configurable Products in Magento 2

Step 2: Install Composer (Optional)

Install Magento 2 windows
  • Browse XAMPP PHP exe file location to install the composer. 

Step 3: Download Magento 2.3.5 setup from the Magento Official website.

Install Magento 2 windows
  • Extract the Download Magento 2.3.5 archive and rename the extracted folder with the name you wish 
  • Copy the renamed folder and past your XAMPP\htdocs location (ex: D:\xampp\htdocs). 
Install Magento 2 windows

Also, read: 4 Effective ways Small Businesses Can Optimize in Magento 2 Store

Step 4: Install Magento 2 (Run localhost open project – localhost/magento)

install Magento 2 xampp windows 10
  • Start Installing (click Start Readiness Check). 
install magento 2 xampp windows 10
  • After click Readiness Check. 
install magento 2 xampp windows 10
  • Click Next and “Add Database” step 2, enter the database details such as server host, username, password, name. 
installing magento on windows
installing magento on windows

Add database name you created in localhost phpMyAdmin then click next. 

  • In the Web Configuration step, enter the store and Magento admin address. Click Next
installing magento on windows
  • Customize Your Store step, enter the details such as time zone, currency, language, and click Next 
installing magento on windows
  • Create an Account step, configure the username, email, and password. Click Next 
installing magento on windows
  • Finally, for the installation step, click Install Now 
installing magento on windows

Also, read: Must use Magento 2 extension for additional functionality

Step 5:  However, the process of installation is incomplete and gives an error

installer magento

Sort the error:

You can replace this function validateURLScheme in File name: \vendor\magento\framework\Image\Adapter\Gd2.php

private function validateURLScheme(string $filename) : bool 
    { 
       $allowed_schemes = [‘ftp’, ‘ftps’, ‘http’, ‘https’];

       $url = parse_url($filename);

       if ($url && isset($url[‘scheme’]) && !in_array($url[‘scheme’], $allowed_schemes) && !file_exists($filename) && strlen($url[‘scheme’]) > 1) { 

       return false;

    } 
    return true;
} 
  • And refresh the window and click install.
  • A success message will be displayed as below after the successful installation: 
installer magento 2

Step 6: Launch the admin panel in the browser

  1. Still if you don’t get any display on the admin dashboard:  
  1. Change URL validator function on  

/vendor/magento/framework/View/Element/Template/File/Validator.php:113 

protected function isPathInDirectories($path, $directories) 
    { 
        $realPath = str_replace(‘\\’, ‘/’, $this->fileDriver->getRealPath($path)); 

        if (!is_array($directories)) { 

            $directories = (array)$directories;
        } 
        foreach ($directories as $directory) { 

            if (0 === strpos($realPath, $directory)) { 

                return true;
            } 
        } 
        return false;
    } 
  1. Refresh page and a dialog box with Magento 2 login screen appear. 
installer magento 2

  • Open Command prompt for running Magento cache clear command.  
  • Go to the Mangento project location directory (D:\xampp\htdocs\magento>) 
  • php bin/magento setup:upgrade 
  • php bin/magento setup:static-content:deploy -f 
  • php bin/magento c:c 
installer Magento 2
installer Magento 2
installer Magento 2

Finally, Magento 2 is successfully installed and is ready to operate on Windows localhost.   

installer Magento 2

Conclusion

In wrapping up these 7 steps to install Magento 2 on a Windows OS using XAMPP, you’ve embarked on a journey that transforms your computer into a dynamic platform for eCommerce development. As a web developer, this process demystifies the installation, making it accessible for anyone eager to delve into Magento’s capabilities.

The straightforward approach outlined here ensures that you’re not bogged down by unnecessary complexities. By following these steps, you’ve not only set up Magento 2 but also gained a foundational understanding of the environment it thrives in.

Now armed with a Magento-powered Windows environment, you’re poised to unleash your creativity and build engaging and robust eCommerce solutions. This isn’t just an installation; it’s the gateway to crafting digital storefronts that stand out in the vast online landscape. Happy coding!

Web Development Services

Are you looking for a reliable web development company? Our highly skilled web developers enables us to deliver result oriented web development services. Contact our team to understand, how we can help you in achieving your business goals.



guest
2 Comments
Inline Feedbacks
View all comments
Taimur khan
Taimur khan
December 17, 2020 1:43 pm

Very well-written article. Thanks for sharing this. Very helpful to me right now.

mayssa
mayssa
September 27, 2021 2:07 pm

good

2
0
Would love your thoughts, please comment.x
()
x