I try install fresh magento 2.4 but always available setup wizard but currently I not see setup wizard in this version.


How to install magento 2.4 ?


5 Answers 5


Example of CLI command install :

php bin/magento setup:install --base-url="http://yourdomaine.com/" --base-url-secure="http://yourdomaine.com/" --backend-frontname="admin" --session-save="files" --db-host="localhost" --db-name="your-db-name" --db-user="your-db-user" --db-password="your-db-password" --admin-firstname="Your_first_name" --admin-lastname="Your_last_name" --admin-email="[email protected]" --admin-user="username" --admin-password="SomeStrongPasswordHere" --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200

If you ever encounter bellow error, you can follow this answer.

In SearchConfig.php line 81: Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

For more information, Magento DevDocs: Install the Magento 2.4 software


if you want to install version using CLI these are basic steps you should follow. check if elastic server is installed, using :

**curl elastic-server-ip:port** //example -> curl localhost:9200

it will output server info if started otherwise start the server

afte this, download Magento2.4 using composer



composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.0 .

after downloading Magento now use below command to install it

php bin/magento setup:install --base-url=http://your-host/m2.4/ \

--db-host=db-host --db-name=db-name --db-user=db-user --db-password=db-password \

--admin-firstname=Magento --admin-lastname=User [email protected] \

--admin-user=admin --admin-password=admin123 --language=en_US \

--currency=USD --timezone=America/Chicago --use-rewrites=1 \

--search-engine=elasticsearch7 --elasticsearch-host=elastic-host \

--elasticsearch-port=elastic-port --backend-frontname=admin

now your magento is ready for development


follow below steps for magento v2.4.1 installation

step-1) setup(install) Elasticsearch and run.

Note: if you are using windows: Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 86. 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;



php bin/magento setup:install --base-url="http://domain.com/" --base-url-secure="https://domain.com/" --backend-frontname="admin" --session-save="files" --db-host="localhost" --db-name="database name" --db-user="database user" --db-password="database password" --admin-firstname="Admin firstname(Anjani)" --admin-lastname="Admin lastname(choubey)" --admin-email="email I'd([email protected])" --admin-user="admin username" --admin-password="admin password" --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200

step-3) After Run above command successful run the below command php bin/magento indexer:reindex

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

php bin/magento cache:clean

php bin/magento cache:flush

Note: if you are using windows:

Change Symlink to copy in file di.xml Find file Validator.php in ...Magento\Framework\View\Element\Template\File At around line 138 replace code with this one

$realPath = str_replace('\', '/',$this-fileDriver-getRealPath($path));

Run : php bin/magento cache:flush

Step-4) Disable The Two Factor Auth

php bin/magento module:disable Magento_TwoFactorAuth

Now you can run and test the website

Frontend Url= http://domain.com/

backend Url= http://domain.com/admin


For Magento 2.4 installation, First, we need to set up an elastic search on your server. Because Magento added new featured on the catalog search. after you need to add an installation command on the terminal.

For more information, Install Magento 2.4


For Install Magento follow the Steps

            - sudo php bin/magento setup:upgrade
            - sudo bin/magento setup:di:compile
            - sudo bin/magento setup:static-content:deploy -f
            - sudo bin/magento indexer:reindex
            - sudo bin/magento cache:flush
            - sudo bin/magento cache:clean
            - sudo bin/magento module:status 
            - sudo php bin/magento   - check when Namespace error
            - sudo php bin/magento setup:di:compile
            - sudo chmod -R 777 var/ pub/ generated/        
            - sudo bin/magento module:disable Codilar_Thor   - Disable any Module
            - rm -rf FolderName   - To Remove any Folder 
       Set the Mode - Production and Development
            - bin/magento dep:mod:show
            - php bin/magento deploy:mode:set production
            - sudo bin/magento de:mo:se developer
          step- 1
           - Check the System Requirement demo
           [![enter image description here][1]][1]

         step- 2
            Step For Local Magento Setup
                - composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:2.3.7-p1 .
                - composer create-project --repository=https://repo.magento.com/ magento/project-community-edition:2.3.7 Magento237(your folder name)
             If You Want To Setup  For Project
                -  Need step -1 complete
                -  clone the project repo
        step -2)i)
                - Create Database on Mysql for install DB
                - Also If You Want To Setup Using new User You can Create
        Database Setup  (Both for Local and Project)
        - bin/magento setup:install  --base-url=http://magento237.local/  --db-host=localhost  --db-name=magento  --db-user=magento237  --db- password=Sanjay1997@@ --backend-frontname=admin  --admin-firstname=admin  --admin-lastname=admin  [email protected]  --admin-user=admin1  --admin-password=admin123  --language=en_US  --currency=INR  --timezone=Asia/Kolkata  --use-rewrites=1
   If You Want To Create New User For Magento
       -  php bin/magento admin:user:create --admin-user=local --admin-password=admin123 [email protected] --admin-firstname=admin --admin-lastname=admin

   Some Issue Need To Check After Install(May You Get Error)
      - cd /etc/nginx/sites-available/
      - cd /etc/nginx/sites-enabled/
      - nginx.sample.config
 If You Have More Than One Magento 
      - sudo ln -s /etc/nginx/sites-available/magento237 /etc/nginx/sites-enabled     (Enable your project)  
      - sudo unlink folder_name                                                       (Inside (/etc/nginx/sites-enabled/) Path)
      - sudo update-alternatives --config php                                        (list php and change the Php Version as per Magento Version)
      - sudo service nginx restart                                                    (Restart Your nginx)

Some Error To Solve in Magento 

      - etc/nginx/sites-available/magento237(magento setup folder_name)         - Path of Folder
      - sudo nano magento237(folder_name)                                       - Need To Open this file or as same for other magento file
     - Check The Below Format
                              upstream fastcgi_backend {
                                                 server unix:/run/php/php7.4-fpm.sock;
                                       server {
                                               listen 80;
                                               server_name local.test.com or (server_name _;);
                                               set $MAGE_ROOT /var/www/html/test;
                                               set $MAGE_RUN_TYPE website;
                                               include /var/www/html/test/nginx.conf.sample;
      - Also Some time Some memory  issue(502 Bad gateway Error) so you can add  Inside(var/www/html/Magento_Folder_Name/nginx.conf.sample file)
                                     fastcgi_buffers 8 16k;
                                     fastcgi_buffer_size 32k;
                                     fastcgi_connect_timeout 90;
                                     fastcgi_send_timeout 90;
                                     fastcgi_read_timeout 90;
      Some Quick Way Need To Check For Get Error
         -  var/www/html/magento_folder_name/app/etc/env.php        ---- >  check the user and database password and all
         -  var/www/html/magento_folder_name/nginx.conf.sample      ----->  check the memory code 
         -  other location --> computer  --> etc/hosts              -----> check the url is added or not 
         -  other location --> computer  --> etc/nginx              -----> check  file inside nginx 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.