Showing results for 
Search instead for 
Did you mean: 

How do I sucessfully install Magento2

How do I sucessfully install Magento2

How do I seccussfully install magento 2 as i get an error message on the base-url.eorror.PNG


I've tried changing localhost to

m246 in the root folder of my project.


Re: How do I sucessfully install Magento2

Hello @robertwill9942, please provide more information on the error received. Maybe a snapshot will help further to understand.

Re: How do I sucessfully install Magento2

Here are the steps for installing Magento 2 properly:

Step 1: Install and Configure XAMPP
- Install XAMPP and configure it according to your system requirements.

Step 2: Configure XAMPP
- In the XAMPP Control Panel, click the "Config" button on the “Apache” row, and select “PHP (php.ini)“.


Step 3: Modify php.ini Settings
- In the php.ini file, locate the following rows and remove the semicolon (Smiley Wink before each row:
- extension=intl
- extension=soap
- extension=sockets
- extension=sodium
- extension=xsl
- Increase the memory_limit to 4G:
- memory_limit=4G


Step 4: Configure Hosts File
- Open the file located at C:\Windows\System32\drivers\etc\hosts.
- Add the following line to the last row:


Step 5: Create a Database


Step 6: Install Elasticsearch
- Magento 2.4 requires Elasticsearch as the catalog search engine.
- Download Elasticsearch 7.6.0 from:
- Extract the downloaded file, navigate to the extracted directory in a terminal window, and run the command:
- .\bin\elasticsearch.bat
- Verify the installation by accessing http://localhost:9200 in your browser.


Step 7: Download Magento using Composer
- Install the latest version of Composer and set up PATH environment variables for convenience.
- After installing Composer, downgrade to an earlier 1.x version using the command:
- composer self-update --1


Step 8: Download Magento
- Navigate to C:\xampp\htdocs and run the command:
- composer create-project --repository-url= magento/project-community-edition=2.4.2 <install-directory-name>


Step 9: Install Magento via Command Line
- Before installing Magento 2.4, make necessary tweaks to Magento files to prevent errors.
- Replace the validateURLScheme function in \vendor\magento\framework\Image\Adapter\Gd2.php with the provided code snippet.


Step 10: Run Magento Setup
- Navigate to your Magento directory and execute the command:
- php bin/magento setup:install --base-url=http://localhost/magento24/ --db-host=localhost --db-name=yourdbname --db-user=yourdbuser --db-password=yourdbpassword --admin-firstname=admin --admin-lastname=admin --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --backend-frontname=admin --search-engine=elasticsearch7 --elasticsearch-host=localhost --elasticsearch-port=9200

I hope this guide proves helpful!

Thank You,

WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

Location: 150 King St. W. Toronto, ON M5H 1J9

Re: How do I sucessfully install Magento2

How come you've instructed to install 2.4.2? Are the other versions not working? 
I ask because I am having lots of trouble with 2.4.7