Magento 2.4.3 Xampp installation
In this article you will find a short and descriptive way to install Magento 2.4.3 on a Windows Xampp environment. You might do so for testing purposes or to preview and configure your Magento installation before uploading it to your server (correcting the store's Base URL and re-indexing afterwards).
Download Xampp for PHP 7.4 from https://www.apachefriends.org/download.html
After installation open the php.ini file from C:/xampp/php/php.ini
Remove the ; from following lines
;extension=intl
;extension=soap
;extension=xsl
;extension=sockets
;extension=sodium
Set values as below
max_execution_time=18000
max_input_time=1800
memory_limit=4G
Open C:/xampp/apache/conf/extra/httpd.conf and check that following lines are un-commented (without a # at the beginning of the line):
Include conf/extra/httpd-vhosts.conf
Include conf/extra/httpd-ssl.conf
Open C:/xampp/apache/conf/extra/httpd-vhosts.conf and add following to the bottom of the file:
<VirtualHost *:80>
DocumentRoot "C:/xamp/htdocs/magento243/pub"
ServerName my.magento.com
<Directory "C:/xampp/htdocs/magento243/pub">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Open C:/xampp/apache/conf/extra/httpd-ssl.conf and add following below the tag <VirtualHost _default_:443>
DocumentRoot "C:/xampp/htdocs/magento243/pub"
ServerName my.magento.com:443
ServerAdmin your@email.com
ErrorLog "C:/xampp/apache/logs/error.log"
TransferLog "C:/xampp/apache/logs/access.log"
Start Xampp and add a database for your new Magento installation using phpmyadmin.
Download and install Composer for Windows from https://getcomposer.org/Composer-Setup.exe
Download and install Elasticsearch for Windows from https://www.elastic.co/downloads/elasticsearch
Download Magento 2.4.3. with or without sample data from https://magento.com/tech-resources/download
Create a new directory in C:/xampp/htdocs/ like magento243 and extract the magento files in this new directory.
For local usage edit the file C:/xampp/htdocs/magento243/vendor/magento/framework/Image/Adapter/Gd2.php and change the line if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes)) { to if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes) && !file_exists($filename)) {
For local usage edit the file C:/xampp/htdocs/magento243/vendor/magento/framework/View/Element/Template/File/Validator.php and change the line $realPath = $this->fileDriver->getRealPath($path); to $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
For local usage edit the file C:/xampp/htdocs/magento243/app/etc/di.xml and change the line Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
Open notepad as administrator and edit the following file: C:/Windows/System32/drivers/etc/hosts
Add at the bottom following line: 127.0.0.1 my.magento.com
Open a command line prompt and navigate to the magento243/bin directory. Copy the command below and change the wording in capitals to your information. Use as password 12 characters with at least one capital and one special character.
php magento setup:install --base-url="https://my.magento.com/" --db-host="localhost" --db-name="DBNAME" --db-user="DBUSER" --db-password="DBPASS" --admin-firstname="FIRSTNAME" --admin-lastname="LASTNAME" --admin-email="YOUREMAIL" --admin-user="USERNAME" --admin-password="PASSWORD" --language="en_US" --currency="EUR" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="ADMIN" --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200
When finished run following commands from the command prompt (one by one):
php magento indexer:reindex
php magento setup:upgrade
php magento setup:static-content:deploy -f
php magento cache:flush
To set you installation to developer mode run following command at the command prompt:
php magento deploy:mode:set developer
To disable two factor authorization at the administrator backend run following command at the command prompt:
php magento module:disable Magento_TwoFactorAuth