Looking to upgrade Magento to the latest version?
There is no setup wizard now. You have to install Magento 2.4 using Command Line.
Magento 2.4 is the latest Magento version. As expected, it has better performance and scalability than the previous versions.
The upgraded version introduced new features:
- Security-only patch available
- More than 30 security enhancements to prevent remote code execution (RCE) and cross-site (XSS) vulnerabilities.
- Inbuilt 2FA feature for the admin dashboard, magento.com users, and cloud SSH access
- Data rendering for UI data providers are now disabled by default.
- PHP 7.4 support was introduced, and PHP 7.1 and 7.2 were deprecated.
- Migration of dependencies on Zend Framework to the Laminas project
- Removal of core integration of third-party payment methods.
- Inbuilt Lazy Loading
- Support for PWA Studio
Let’s see the Magento 2.4 installation process via Command-Line.
Installing Magento 2.4 using Command Line
- Log in to Magento Servers
- Useful Magento Commands
- Install the Magento Software using Command Line
- Verify the Installation
Step 1: Log in to Magento Servers
The first step is to log in to the server you prepared to install Magento. Make sure the server fulfils all the Magento 2 requirements.
You will need ‘Write’ permission to install the Magento.
Bash Shell users can use the following syntax to switch to the Magento file system owner and enter the commands simultaneously.
su <Magento file system owner> -s /bin/bash -c <command>
If you don’t have the Magento file system owner logins, use the following command:
sudo -u <Magento file system owner> <command>
Simply add <magento_root>/bin to your system PATH to run Magento commands from any directory.
Step 2: Useful Magento Commands
You will be working with the Command line. If you need the list of all commands, enter the following command:
Want help with any particular commands? Use the below command:
bin/magento help <command>
Step 3: Install the Magento Software from the Command Line
Magento installation Command line format:
magento setup:install --<option>=<value> ... --<option>=<value>
You can add options and attach their value. For example:
A command to install Magento 2:
php bin/magento setup:install --base-url="http://127.0.0.1/m111/" --db-host="localhost" --db-name="m111" --db-user="root" --db-password="root@123" --admin-firstname="admin" --admin-lastname="admin" --admin-email="email@example.com" --admin-user="admin" --admin-password="admin@123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin"
The base URL is localhost IP. DB’s name is m111.
And everything else is easily understandable from the example from Command Line.
The following table shows the user information and credentials for the Magento admin user.
|–admin-firstname||Magento administrator user’s first name.||Yes|
|–admin-lastname||Magento administrator user’s last name.||Yes|
|–admin-email||Magento administrator user’s e-mail address.||Yes|
|–admin-user||Magento administrator username.||Yes|
|–admin-password||Magento administrator user password.||Yes|
Verify the Installation
#1 Verify the storefront
Open any latest browser and enter your Magento store URL to open the storefront.
If the Magento installation base URL is “http//www.example.com,” enter it into your preferred browser.
If the page loads up and looks like the image below, it means the installation is successful.
#2 Verify the Magento Admin Page
Finally, you need to check if the Magento admin is working fine. Enter the Magento store base URL in your favourite browser.
For example: https://www.example.com/admin_breeze
A login page will open. Enter the username and password. If everything goes as expected, the Magento admin dashboard will load up.
Your Magento installation is successfully done, and your store is ready if it looks like this:
It is a good security practice not to use the default login URL. Follow the steps to change the Magento login URL.
Install Magento using Breeze
The CLI method is straightforward. Optimization of servers, however, is a different game.
You have to optimize the server for Magento, fulfil all the requirements, and then tweak it to run at high performance.
As your business scale, the server will demand more management. It takes a significant amount of time and resources from your business every day.
How about a product that does it all for you?
With Breeze, you only have to pick your store name and password – and your store will be built.
- Store loading under 3 seconds with quick TTFB
- Active security monitoring – mitigating DDoS attacks and BOT attacks
- Uptime monitoring keeping your store always available
- Quickly scalable in case of traffic spike during promotion
- Use the dashboard to use one-click tools to manage & run your store efficiently
Want to take a Demo? Just sign up on the Breeze, and ask the live chat for Coupon Code to build your first store.
Whether you install Magento using composer or using command line, you have to prepare the server for Magento.
In this quick tutorial, you learned to install Magento 2 using the Command line. If there is any question, please leave it in the comment section.