cancel
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 127.0.0.1

m246 in the root folder of my project.

7 REPLIES 7

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:
- 127.0.0.1 www.localhost.com

 

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: https://www.elastic.co/downloads/past-releases/elasticsearch-7-6-0
- 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=https://repo.magento.com/ 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-email=admin@admin.com --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

Re: How do I sucessfully install Magento2

Hi @robertwill9942,

 

I wonder if this error has been fixed. If not, please provide me a detailed screenshot of this issue; maybe I can help you.

Mageplaza | Top-Rated Magento Extension and Solution Provider


Should you have any questions or concerns, feel free to contact us via consultant@mageplaza.com

Re: How do I sucessfully install Magento2

Hello,

Does this issue fixed? If not please share the detailed error with the screenshot, or try again with installing latest version of the Magento.

I think this guide will be helpful: How to Install Magento 2

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: How do I sucessfully install Magento2

Check

Re: How do I sucessfully install Magento2

To install Magento 2, ensure your server meets the requirements, download the Magento 2 package, and either use the Web Setup Wizard or Composer for installation. Just like finding the best value thermal scopes, ensure you follow the setup steps carefully for optimal results. https://medium.com/@fadimahar02/best-thermal-scopes-84320b5ba0a4