How Install Magento 2.4.6 In Windows Using Xampp Server
To install Magento 2.4.5 on Windows 10, follow these steps:
Download and install XAMPP from https://www.apachefriends.org/download.html
Enable the necessary PHP extensions and configure the php.ini file as follows: [PHP] ;extension=gd ;extension=intl ;extension=soap ;extension=xsl ;extension=sockets ;extension=sodium
Remove the semicolon ";" from the above lines of the php.ini file, and then save the file.
Set the following values for the PHP settings: max_execution_time=3000 max_input_time=2000 memory_limit=4G
Restart XAMPP after making these changes.
Download and install Composer from https://getcomposer.org/download/.
Download and run Elasticsearch from https://www.elastic.co/downloads/past-releases#elasticsearch. You can use the following link to download Elasticsearch for Windows: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.3-windows-x86_64.zip.
Configure the server by creating a virtual host. Open the file C:\xampp\apache\conf\extra\httpd-vhosts.conf and add the following code at the bottom of the file:
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/mage2rock/pub" ServerName mage2rock.magento.com </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs" ServerName localhost </VirtualHost>
- Open the file C:\Windows\System32\drivers\etc\hosts in Notepad and add the following line at the bottom of the file: 127.0.0.1 mage2rock.magento.com
Restart XAMPP after making these changes.
- Download Magento by running the following command: composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition mage2rock
You must enter your Public Key (username): 49d5e318ce1764cbb3b709e1380b34ce and Private Key (password): 5b36e15269917b811c1516fa07567e72.
Create a database in phpMyAdmin.
Install Magento by running the following command: php bin/magento setup:install --base-url="http://mage2rock.magento.com/" --db-host="localhost" --db-name="mage2rock" --db-user="root" --db-password="" --admin-firstname="admin" --admin-lastname="admin" --admin-email="144haroon@gmail.com" --admin-user="haroon" --admin-password="haroon@123456" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin" --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200
Edit the Gd2.php file located in vendor\magento\framework\Image\Adapter and replace the validateURLScheme function with the following code:
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)) {
Comments
Post a Comment