
In this guide, we are going to install Magento 2 on the Windows platform using the XAMPP server. We need to know about the system requirements that are mentioned below:
Apache 2.2 or 2.4
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.
To Download the 7.2.x version, click here.
Open and install XAMPP on your 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)

Search for extension=php_intl.dll, extension=soap, extension=sockets , and extension=php_xsl.dll, and remove the semicolon “;” at the beginning of both.

Start the Apache and MySQL services from the XAMPP control panel.

Download Composer and install it on Windows.

Browse the XAMPP PHP exe file location to install Composer.

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


Start Installing (click Start Readiness Check).

After clicking Readiness Check.

Click Next and “Add Database” step 2, enter the database details such as server host, username, password, and name.


Add the database name you created in the localhost phpMyAdmin, then click Next.
In the Web Configuration step, enter the store and Magento admin address. Click Next

Customize Your Store step, enter the details such as time zone, currency, language, and click Next.

Create an Account step, configure the username, email, and password. Click Next

Finally, for the installation step, click Install Now.


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:

Still, if you don’t get any display on the admin dashboard:
Change the 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;
}
Refresh the page, and a dialog box with the Magento 2 login screen appears.

Open the Command Prompt to run the Magento cache clear command.
Go to the Magento 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



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

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!
A: Yes, you can install Magento 2 on Windows without XAMPP. For this, you can use the WAMP, MAMP, or a manual Apache–MySQL–PHP setup to install Magento 2 without XAMPP.
A: PHP 7.2.x is a recommended version when you are looking to set up Magento 2 locally on your Windows operating system.
A: Composer helps you manage Magento dependencies, updates, and extension efficiency.
A: Yes, it is safe for you to use the Magento 2 on localhost for development.
We are more than just developers and consultants—we are your partners in navigating the digital landscape. Let us be the engine behind your next big success while you focus on your core vision.
Explore Opportunities!