Table of Contents
Step 1: Download and Install Xampp and enable PHP extensions in php.ini
Step 2: Download and install composer
Step 3: Download elasticsearch then run
Step 4: Download magento2.4.7 using composer
Step 5: Create Virtual Host for magento
Step 6: Create database user and database for Magento 2.4.7 using phpMyAdmin
Step 7: Install Magento 2.4.7
Download and install XAMPP
=======================
https://www.apachefriends.org/download.html
Download and install
=================
Compopser https://getcomposer.org/download/
Download and run Elasticsearch 7.x.x
==========================
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.3-windows-x86_64.zip
Download Magento 2.4.7
====================
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition mage2rock
Public Key(username): ba32dc9a261071fc5e31109af4a3518d
Private Key(password): e31e5cdc84cdf13024845b77b23e489a
Server configuration (Create virtual host)
C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/magento2/pub"
ServerName rocking.magento.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
--------------------------------------------------------------------------------------------------
then open C:\Windows\System32\drivers\etc\hosts file in notepad and add the below line at the bottom of the file.
127.0.0.1 rocking.magento.com
Restart XAMPP
--------------------------------------------------------------------------------------------------
Create Database in phpmyadmin
http://localhost/phpmyadmin/
--------------------------
Install Magento
php bin/magento setup:install --base-url="http://rocking.magento.com/" --db-host="localhost" --db-name="dbmagento2" --db-user="root" --db-password="" --admin-firstname="admin" --admin-lastname="admin" --admin-email="info@mage2rock.local.com" --admin-user="admin" --admin-password="Admin@12345" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin" --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200
--------------------------------------------------------------------------------------------------
Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 70. Replace function with this:
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;
}
--------------------------------------------------------------------------------------------------
Go to: C:\xampp\htdocs\magento2.4\vendor\magento\framework\View\Element\Template\File - > Edit Validator.php using a text editor and find this line: Find this line
strpos($realPath, $directory)
Replace strpos($path, $directory)
--------------------------------------------------------------------------------------------------
Then, Open up app/etc/di.xml in the editor, fint this line
“Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink” replace
“Magento\Framework\App\View\Asset\MaterializationStrategy\Copy”
-------------------------------------------------------------------------------------------------- ===================
Run Below Command
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth
--------------------------------------------------------------------------------------------------
Thanks for watching------------
Comments
Post a Comment