How to Install Magento 2.4.2 on Localhost Using Xampp

Magento 2.4.2 introduces performance enhancements, security, and significant platform improvements. Security enhancement includes expansion of support for the SameSite attribute for all cookies. Also, Elasticsearch 7.9.x and Redis 6.x are now supported.

The store owners can offer a better shopping experience to their customers and leverage these benefits by upgrading to the latest Magento 2 version!

However, sometimes it may happen that you face some issues while installing Magento 2. Or you may make some mistakes while installation due to lack of expertise in Magento.

Hence, it is recommended to follow a thorough guide or seek expert help in installing Magento 2.

Here’s the stepwise guide that you can rely on to install Magento 2.4.2 on localhost using Xampp.

First, download Magento 2 and then follow the below steps:

Steps to Install Magento 2.4.2 on Localhost

  1. Run the below command after downloading Magento 2.4.2.

Common Magento 2.4.2 Installation Issues and their solution:

  • Admin Error 404

After passing the installation command, run the URL in the preferred browser. It’s displaying an error, as shown below. 

Install Magento 2.4.2 on localhostHere’s a quick fix for that issue:

    1. Copy the index.php and .htaccess files from the pub folder and paste into the root directory.
    2. Both files are in the pub folder when we download the setup for security purposes, but we’ve to follow this step while installing in the local.
    3. Replace the below line in the index.php file that we’d paste in the root directory.


    4. Insert the below four rows in the core_config_data table.
      Install Magento 2.4.2 on localhost


    5. Pass the below command
  • Admin Blank Page Issue

Once solving Admin 404 Error, pass the URL in a browser and don’t panic if the admin page displays nothing!

Just follow our solution to solve the ‘Admin Page Blank Issue

Here you go. After implementing a solution of the admin blank page, your Magento 2.4.2 store is ready to configure!

If your products are not being displayed in the frontend after the upgrade, you can follow this tutorial: How to Solve Widget.getProductId is Not a Function.

So that was all about installing Magento 2.4.2 on localhost using Xampp

Ask your doubts regarding this blog in the Comment section below.

I’d be happy to help.

Thank You.

Also Read: How to Install Magento 2.4 via Command Line

(based on 25 Reviews)
How to Install Magento 2.4.2 on Localhost Using XamppAuthor Magento Badge

Sanjay Jethva

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.


  • Basheer

    Not Found
    The requested URL was not found on this server.
    Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/7.3.27 Server at localhost Port 8080

    iam getting this error and new to learning mogento. Please help
    thanks in advance

Leave a Reply

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