- Requirements - System Requirements.
- Elastic Search - Required Elastic Search.
- Diagram - Installation Flow Chart.
- Magento- Download Magento.
- XAMPP- Download Apache Server For Local.
- Composer - Download Composer.
- Elastic Search - Download Elastic Search.
- Download XAMPP and install and Run.
- Download Composer and install.
- While Installing Composer Select "C:\xampp\php\php.exe" then finish installing.
- Download Elastic Search Zip File.
- Extract zip to "C:\xampp\htdocs" and Rename folder "elasticsearch" inside "C:\xampp\htdocs"
- Now Goto "C:\xampp\htdocs\elasticsearch\bin\elasticsearch.bat" and RunAs Administrator also Check in Browser Working or Not:
http://localhost:9200/
- Don't Close Or Terminate "elasticsearch.bat" until magento install has done.
- Download Magento zip file. (Choose Sample Data or Empty then Signin/Signup to Download)
- Extract zip to "C:\xampp\htdocs" and Rename folder "yourdomain.com" inside "C:\xampp\htdocs"
- Now Goto "C:\xampp\htdocs\yourdomain.com\vendor\magento\framework\Image\Adapter\Gd2.php" file and open it Any Editor.
- Areound Line 86. Replace the code below:
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)) {
return false;
}
return true;
}
-
Now Check in Browser "Localhost/yourdomain.com" and it's asking to setup with command line Ex. Below:
Welcome to Magento Admin, your online store headquarters.
Please review Terms & Agreement and read Getting Started to learn
how to install Magento using the command line. -
Now Open Browser and Type
http://localhost/phpmyadmin/
- Goto: Database Tab >> Type: magentolocal_db >> Click: Create
- Now goto "C:\xampp\htdocs\yourdomain.com" and Address Bar Type "cmd" to run the command same folder or Goto same directory using command line.
- Now Run below command and chnage yours a) Domain Name, DB Name, User, Email & Password:
php bin/magento setup:install --base-url="http://localhost/yourdomain.com" --db-host="localhost" --db-name="magentolocal_com_db" --db-user="root" --db-password="" --admin-firstname="system" --admin-lastname="admin" --admin-email="devomman@gmail.com" --admin-user="systemadmin" --admin-password="@dminPass1" --use-rewrites="1" --backend-frontname="admin"
-
First Time Xampp User Getting this Error Below will Appear in Command Line:
In Installer.php line 545:\
Missing following extensions: 'intl' 'soap' 'xsl' 'sockets' -
So Now We have enable following extensions in "C:\xampp\php\php.ini" open php.ini file in Editor
;extension=intl
;extension=soap
;extension=xsl
;extension=sockets
- Search one by one extension line in editor and uncomment the line to enable.
- Once you enable then stop and exit XAMPP Server and Restart don't close/terminate elastic search until the setup process completely done.
- Now Follow the Same
Step 16 - Step 17.Again and theresult:will appear Below ex:
[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin
[SUCCESS]: Nothing to import.
- Now Follow the Same
Step 16and Type in Command Line Below:
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush
- After Done >> Goto "C:\xampp\htdocs\yourdomain.com\app\etc\di.xml" and Open in Editor
- Search "Symlink" and Replace to "Copy" This Step is Not Required - try without this step
- Now Goto "C:\xampp\htdocs\yourdomain.com\vendor\magento\framework\View\Element\Template\File\Validator.php" and Open in Editor
- Chnage the Line Around 138 Below:
$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
- Now Follow the Same
Step 16and Type in Command Line Below and Done!
php bin/magento cache:flush
- Disable Magento_TwoFactorAuth if Needed Follow the Same
Step 16and Type in Command Line:
php bin/magento module:disable Magento_TwoFactorAuth
- Now Follow the Same
Step 16and Type in Command Line Below and Done!
php bin/magento cache:flush
Note: Please download this files before you start.
| Download | Link |
|---|---|
| Magento | https://magento.com/tech-resources/download |
| XAMPP | https://www.apachefriends.org/download.html |
| Composer | https://getcomposer.org/ |
| Elastic Search | https://www.elastic.co/downloads/elasticsearch |
Thanks to Muhammad Omman | Email: devomman@gmail.com