How To Install Magento 2.3.1 on Localhost using XAMPP

Here we are going to see Magento 2.3.1 installation on localhost using XAMPP software on Windows 10.

Tutorial References:


Before we start installation, we need to have these things ready on hand:

  • XAMPP Server installed in our computer.
  • Magento 2.3.1 Application Setup. Magento Open Source can be find from here
  • Composer

Magento 2.3 Application requirements:

  • Web server: Apache v2.2 or v2.4 or nginx 1.x
  • PHP: ~7.1.3 or ~7.2.0
  • Database: MySQL v5.6, v5.7
  • Required PHP extensions:

Open your XAMPP server and start Apache and MySQL applications

Note: Composer is required for developers who wish to contribute to the Magento 2 codebase or anyone who wishes to develop Magento extensions and extend Magento project. Composer enables us to manage the Magento system, extensions, its dependencies, and also allows us to declare libraries for the project.

Learn: How to install Composer?

Note: Once composer is installed, we have to enable the extension (php_intl.dll) in our php.ini (php configuration) file.
To enable the extension, open php.ini file (default path: C:\xampp\php\php.ini) and uncomment the line “extension=php_intl.dll” by just removing semicolon “;” from the starting of the line and restart XAMPP control panel (by clicking on stop and start button in “Actions” column).

Now, we will create a new folder in c: -> xampp -> htdocs folder (default path: C:\xampp\htdocs) (we have used folder name “mage”). Now go inside “mage” folder and extract Magento 2.3.1 files (which we have downloaded earlier from here) inside this folder.

Note: Magento 2.3 allows us to install the Magento software and extensions using either the Web Setup Wizard or the command line.

First, we have to create an empty database in our local phpmyadmin.
Open any browser and go to http://localhost/phpmyadmin/
Then create a new Database.
or we can create using following SQL:

where “mage” is database name.

Way 1:
Here we are going to use “Web Setup Wizard”.

To install the Magento software using the Setup Wizard:

Step 1: Start a web browser.

Step 2: Enter the following URL in the browser’s address or location bar:

It will show you following screen:

Step 3: Now click on “Agree and Setup Magento” button.

Step 4: click on “Start Readiness Check” button.

NOTE: If configuration (PHP extension settins) is setup correct, then we will find following screen:

Otherwise we have to setup configuration properly again.

Step 5: Now click on “Next” button.

Step 6: Enter host, database-username, database-password, database-name, table-prefix (optional):

Now click on “Next” button.

Step 7: Enter web url for magento project (by default magento setup base url for us), we can choose some advance options also, as visible in below screen:

Now click on “Next” button.

Step 8: Now select store default Timezone, default Currency, default Language:

NOTE: We can select and deselect any 3rd party modules from “Advanced Modules Configurations”.

Now click on “Next” button.

Step 9: Now enter admin user’s info like username, email, password and confirm password:

Now click on “Next” button.

Step 10: If all goes correct, then we can find Install button:

Now click on “Install Now” button.

Success: If installation is successful, then Magento will show us following success screen, with encryption key and other details of our Magento project:

Way 2:
Here we are going to use “Command Line”.

Note: Hold the Shift key and right click, and Select “Open PowerShell window here”. This will open PowerShell window on the location.
Note: We can also use Windows Command Prompt or GIT Bash (if installed). Open GIT Bash or Windows Command Prompt and change location to folder (C:\xampp\htdocs\magento), where “magento” is our Magento project folder name.

to understand above commands, please visit this link.

If installation goes fine, we can find above success result in our Windows Command Prompt or GIT Bash window.


Magento 2.3.1 is successfully installed on our localhost.
We can access localhost magento project using http://localhost/mage/ url in any web browser.

Leave a Reply

Your email address will not be published. Required fields are marked *