How to install magento in easy steps?

Magento is very easy to install. So below are the prerequisite for installation:

1. The PHP version must be required 7.4 version or higher than it.

2. Below extension must be enabled:

ext-bcmath, ext-ctype, ext-curl, ext-dom, ext-gd, ext-hash, ext-iconv, ext-intl, ext-mbstring, ext-openssl, ext-pdo_mysql, ext-simplexml, ext-soap, ext-xsl, ext-zip, lib-libxml

Now, start exactly how to install magento and setup. So below are the steps for that:

1. First of all need to install composer. For that visit below link:
   https://getcomposer.org/download/

2. Create the DB to MySQL. For Example magento2.3.7

3. Donwload the magento 2.3.7 (You can also download the higher version.) version source code from below link:
https://magento.com/tech-resources/download

4. Now set the database details, magento front and admin related details to below commond and run this commpond to commond promt to your current magento project directry path: 

 For ex. of path:
 D:\xampp\htdocs\magento237>

php bin/magento setup:install --base-url="http://localhost/magento237/" --db-host="localhost" --db-name="magento237" --db-user="adminer" --db-password="adminer@123" --admin-firstname="Sandy" --admin-lastname="Thakkar" --admin-email="thakkar.sandeep@gmail.com" --admin-user="admin" --admin-password="admin@123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin"

5. At above commond running time you will get Gd2.php related one error with particular line on commond prompt. So for that need to refer the below link:   

https://avinashkonanki.com/2021/02/25/unable-to-apply-data-patch-magentothemesetuppatchdataregisterthemes-for-module-magento_theme-and-wrong-file-in-gd2-php/

6. Need to run command for setup upgrade: php bin/magento s:up

7. Need to run command for compile: php bin/magento s:d:c

8. Need to riun command for deploy: php bin/magento setup:static-content:deploy -f

9. Need to run commond for catch flush or clean: php bin/magento c:f
     This will clean the tempory stroage only. For whole magento project catch clearing need to run below commond:
      php bin/magento c:c

10. After that need to open below link on browser for admin:
     http://localhost/magento237/admin
     
    If it will give blank page then need to fix that issue by bolew steps:
    a. Open this file:
    Navigate to 
    #/vendor/magento/framework/View/Elemnt/Template/File/Validator.php

    b. Find the below string:
        $realPath = $this->fileDriver->getRealPath($path);

        and replace it with:
        $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

    For ref: https://meetanshi.com/blog/solved-magento-2-2-7-and-2-3-admin-page-blank-issue/

11. Now refresh the browser page it will dispaly magento admin login page.

Wow! Magento has been setup successfully

User or Front Page: http://localhost/magento237/



Admin or Back End page: http://localhost/magento237/admin/









Comments

Popular posts from this blog