The latest Magento 2.4 version was released on 28 July 2020 and includes a number of enhancements to the quality, security, and performance of the platform. and provide fixes of hundreds of existing issues.
The Highlights of Magento 2.4:-
- 2FA security for Magento 2 admin panel
- Purchase Approval Workflows
- Platform Upgrades
- Infrastructure Improvements
- PWA Improvements
- Performance Improvements
- Seller-assisted shopping
- In-Store Pickup
- New Media Gallery
We can check Magento 2.4 server requirements from here.
Magento recommends installing on PHP 7.4 even it can be installed on 7.3 but it is not recommended and can be used for Upgrading from 2.3,
We need to configure and install the elastic search 7.6.x on our server to install the latest Magento 2.4 because elastic search is now the default search engine for Magento and MYSQL search is removed completely. So now we cannot install Magento without the elastic search.
Steps to Install Magento 2.4 with Command Line:-
Go To your root Directory where your Magento application will be installed. and Execute following command:-
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4
This above command will download the installation files in the current directory and prepare them for the installation.
After the command finishes, you can run the installer by executing:-
php bin/magento setup:install --base-url="http://test-webiators.com/" --db-host="db-host" --db-name="db-name" --db-user="db-user" --db-password="db-password" --admin-firstname="admin" --admin-lastname="admin" --admin-email="email@example.com" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin"
Explanation for above Command line params
–base-url : Its our Magento 2 Base URL
–db-host : Its Database Host
–db-name : Its Database Name
–db-user : Its Database User
–db-password : Its Database Password
–admin-firstname : Its Admin First name
–admin-lastname : Its Admin Last Name
–admin-email : Its Admin Email
–admin-user : Its Admin User
–backend-frontname : Its Admin frontname (URL) eg: store.com/admin
–admin-password : Its Admin Password
–language : Its Default store locale
–currency : Its Default store Currency
–timezone : Its Default store Timezone
–use-rewrites : Its Default configurations for URL Rewrite
Once execution of the command is completed, we will get a message similar to below :
[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin
Nothing to import.
This is an indication of a successfully completed installation process. Hurray!!!
php -dmemory_limit=5G bin/magento setup:upgrade
php -dmemory_limit=5G bin/magento setup:di:compile
php -dmemory_limit=5G bin/magento setup:static-content:deploy -f
php -dmemory_limit=5G bin/magento cache:flush
php -dmemory_limit=5G bin/magento cache:clean
php -dmemory_limit=5G bin/magento indexer:reindex
After completing above steps, you should be able to open the frontend and backend of Magento 2.4
But now you won’t be able to login Magento admin panel because Magento 2.4 has introduced Two-Factor Authentication (2FA) for admin and it will not let admin log in until you provide the correct email and configure SMTP so that the System can send an email.
During the setup of 2FA ,it is recommended to use the Google Authenticator Mobile application on your phone. After setting this up you can scan the code and login upon filling the generated four-digit code.
You can find more information about 2FA introduced in Magento 2.4 here: Two-Factor Authentication.
To Skip Authentication Step for now the only solution I found is to disable the two-factor authentication module by running below command:-
php bin/magento module:disable Magento_TwoFactorAuth
Now flush cache and refresh admin.you are now able to login in admin panel.
Above were the steps to Install Magento 2.4 via Command Line. If you find any issue while following this article feel free to leave comments I would be glad to help you,
Webiators Also provide Magento 2.4 Installation Service if you want we can help you with Magento 2.4 Services with no time and 100% money-back guarantee, feel free to Contact us NOW…
If You are aware of magento and its updates please try to check your knowledge.