How to Install Magento2.4 Using XAMPP

 

             Magento2.4 Installation Cases through downloaded archive 

INTRODUCTION:-

XAMPP: XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages. Since most actual web server deployments use the same components as XAMPP, it makes transitioning from a local test server to a live server possible. 

Magento 2 platform:

• A flexible, open source commerce platform and content management system
• Written in PHP; leverages elements of Zend Framework and MVC architecture
• Extremely configurable

Part 1: Install and configure XAMPP

Step 1: Download XAMPP

You can download the latest XAMPP version on Apache Friends website.

Step 2: Install XAMPP

After downloading XAMPP, double-click on the file to install it.

Click Next and continue the process up to finish button. After installation, you will find xampp folder in your C drive.

Step 3: Open xampp-control panel and start the apache & MYSQL.

Step 4: Go to chrome and run ---> http://localhost/

Step 5: Click on PhpMyadmin in xampp dashboard and create a new database.

Give database name and change to Collation in dropdown button and click create.

 

Part 2: Download and install Magento 2 using composer

Step 1: Download and Install latest Composer and run composer in your cmd.

Step 2: Download and Install Java SE Development Kit.

Step 3: Download the latest version of Elasticsearch and Install.

please keep the downloaded archive into htdocs and extract it. And run the command prompt.(....\xampp\htdocs\elasticsearch-7.9.2\bin\elasticsearch.bat).

Go to chrome and run --> http://localhost:9200/

Step 4Download Magento2.4

download Archive (zip/tar) with sample data

You can download the latest Magento 2 release along with sample data from Magento website: https://magento.com/tech-resources/download.



If you are not logged in yet, there will be a popup requiring you to sign in to your account.If you don’t have an account, click on “Create an account now”.
 
After the download is complete, placed an archive inside " xampp\htdocs\Demo” folder and extract the downloaded archive file into that folder.

Note: Create a folder in xampp\htdocs\

Check Demo folder in htdocs after completion of your installation.

In Demo folder --> We need to change the littlie bit code in below files 

Step 5: Change Symlink to copy in file di.xml

....\xampp\htdocs\demo\app\etc\di.xml.  

Step 6: Find file Validator.php in ....\xampp\htdocs\demo\vendor\magento\Framework\View\Element\Template\File\ Validator.php

And replace the code at line 138.

Step 7: Add code at the end of line 90 in Gd2.php.

....\xampp\htdocs\demo\vendor\magento\framework\Image\Adapter\Gd2.php

Step 8: Remove “;” before extension(intl, xsl, socket, soap) in php.ini file.

Step 9: Install Magento.

 9.1: Command Line Installer:

....\xampp\htdocs\demo> php bin/magento setup:install --base-url="yourdomain" --db-host="localhost" --db-name="basics" --db-user="root" --db-password="" --admin-firstname="admin" --admin-lastname="admin" --admin-email= "example@gmail.com" --admin-user="admin" --admin-password="admin123" --use-rewrites="1" --backend-frontname="admin"

Please do not turn off elasticsearch, while run the command.

Step 10: Run the below commands and test the result.

php bin/magento indexer:reindex

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

php bin/magento cache:flush

Conclusion:

Step 11: We can see the sample data in database.

Step 12: Now we can access home page and admin panel.

For accessing the Homepage link: http://localhost/demo/

Step 13: For open Admin Panel link ---> http://localhost/demo/admin0/ and give the credentials.

Click on Sign In.

Cheers,

Nagamani Pragada.

 

Comments

Popular posts from this blog