Are you looking to better manage your Magento 2 ecommerce platform? Our Magento 2 help is right here for you with the answers to the most common questions!
Magento 2 Help: Questions & Answers
Is Magento 2 a good platform?
Are you in the market for a complex yet powerful, an open-source Content Management System (CMS) ecommerce platform like Magento 2 will satisfy your requirements. Magento brings you endless customization and scalability possibilities for your business.
How do I upgrade to Magento 2?
Step 1: Back up your Magento store
Learn how to create a manual backup using the command line in our related help article.
Step 2: Turn on maintenance mode
It would be best if you put your store in maintenance mode while upgrading. Use the command below to enable it:
php bin/magento maintenance:enable
Step 3: Upgrade to Magento 2 store
Step 3.1: Check the Composer version
Check Composer version using the below command:
composer -V
Magento 2.4.2 introduces Composer 2 support. Magento 2.4.1 must first be upgraded to a version of Magento compatible with Composer 2. Hence, if you find that your Composer version has not been upgraded, run the following command:
mkdir -p ~/.local/bin ; cd ~/.local/bin ; wget https://getcomposer.org/composer-2.phar ; chmod 755 ./composer-2.phar ;mv composer-2.phar composer ; echo "export PATH="$HOME/.local/bin:$PATH"" >> ~/.bashrc ; echo "COMPOSER 2 INSTALLED" ; source ~/.bashrc ; composer -V
Step 3.2: Flush the Magento cache
Refer to our Magento help article on how to flush the Magento cache, or follow the steps in the command lines below:
php bin/magento cache:flush rm -rf var/cache/* rm -rf var/page_cache/* rm -rf var/generation/*
Step 3.3: Run the upgrade module for Magento via CLI
Run the upgrade module and complete the Magento 2 setup upgrade. Use the command below:
php bin/magento setup:upgrade
Step 3.4: Run the compile command, followed by the reindex command
php bin/magento setup:di:compile php bin/magento indexer:reindex
Step 4: Disable maintenance mode
php bin/magento maintenance:disable
Step 5: Check version
The overall Magento 2 setup and installation process has been improved. Now you may check the Magento version using the following command:
php bin/magento --version
Does Magento 2 support WebP?
Yes, indeed! WebP is a suite of tools used to support the WebP image format, which was designed for speed. You may download the suite of tools via the following URL:
https://developers.google.com/speed/webp/download
In most cases, it is best to have all of them installed except for vwebp, since that's just a WebP file viewer, which isn't needed on a server.
How to use the custom Admin URL in Magento 2?
In a common setup, the Admin URL immediate follows the base URL. However, there are ways to the store Admin URL in other paths, including for it to be located in one directory below the root.
Changing the Magento 2 Admin URL path to another location is possible. Magento allows you to customize the Admin URL for your store in three ways.
Customize the Admin URL for Your Store Method 1: Via the Magento 2 Admin panel
-
Log in to Magento 2 Administration >> Stores >> Settings >> Configuration.
-
On the left menu, under the Advanced section, click on Admin.
-
Expand the Admin Base URL section and Set Use Custom Admin URL to “Yes” and continue.
-
Then, enter the Custom Admin URL that you want to.
-
Set Custom Admin Path to “Yes” and continue. Then, enter the Custom Admin Path.
- Click on Save Config.
Customize the Admin URL for Your Store Method 2: Change Admin path in env.php
-
Access the domain document root.
-
Open app/etc/env.php file in the website directory.
-
Search for the code that says 'frontName' and replace the code in the statements to one side of 'frontName' and replace 'administrator' with your new Admin URL.
<?php return [ 'backend' => [ 'frontName' => 'admin'
Customize the Admin URL for Your Store Method 3: Customize the Admin URL for your store via SSH
-
Log in to your server via SSH.
-
Navigate to the document root of your store.
- Run the below command:
php bin/magento setup:config:set –backend-frontname=“newadminurl”
How to back up the Magento 2 site and database?
We keep 30 days of incremental backups as a standard practice. So, despite the fact that your site will be supported naturally, as an admin, you have the option to make a backup of your site whenever you prefer.
Please note that backups are run for live sites, developer sites, and staging sites.
What are the steps to make a backup as an admin?
Log in to your Client Portal, and from the main menu click Plans.
Please choose your desired plan, then click its name or select Plan Dashboard from the menu.
Check out this informative video about the Client Portal!
Click on the site name that you want to create the backup.
From the main menu click on Backups.
Click Create Backup.
Click Create Backup again to confirm.
Check out this article from our Nexcess Knowledge Base to find out how to create a manual backup via the command line.
How to configure Elasticsearch on Magento 2?
Magento requires Elasticsearch as a catalog search engine, starting with version 2.4.
Refer to our Magento 2 help article for details about installing Elasticsearch and initial configuration.
Why does Magento 2 perform slowly?
If Magento 2 fails to meet your speed expectations, you can try to:
-
Upgrade Magento to the latest version.
-
Enable Varnish Cache.
-
Set flat categories and products to increase the read speed of the database.
-
Reconfigure JavaScript and CSS settings on Magento 2.
-
Set up Content Delivery Network (CDN).
-
Optimize images and themes.
- You can find detailed explanations of each point in The Ultimate Magento 2 Checklist for Performance.
How to enable and disable a module in Magento 2?
Modules can be enabled or disabled in Magento 2 by executing a command from the Magento root. Use the following command to list all modules if you do not know the exact name of your module:
php bin/magento module:status
To enable or disable available modules, run the below commands:
magento module:enable [-c|--clear-static-content] [-f|--force] [--all] <module-list> magento module:disable [-c|--clear-static-content] [-f|--force] [--all] <module-list>
Enable module:
php bin/magento module:enable Vendor_ModuleName
Disable module:
php bin/magento module:disable Vendor_ModuleName
Run the following command to update the database schema if you enabled one or more modules:
php bin/magento setup:upgrade
How to schedule cron jobs in Magento 2?
Refer to the How to schedule cron jobs in Nexcess Cloud article.
How to change the domain name in Magento 2?
-
On the Admin Panel, select Stores >> Configuration.
-
Then, select General and then Web navigation menu.
-
Expand the Base URL section. For example, if you want to change the current domain to example.com, you should replace it with the new one.
-
Similarly, update the same in the Secure Base URL.
- Click on Save Config.
Useful YouTube > Nexcess Channel Links
- https://www.youtube.com/watch?v=OAHwmysUd-8
- https://www.youtube.com/c/nexcessnet-1/
- https://www.youtube.com/c/nexcessnet-1/featured
- https://www.youtube.com/c/nexcessnet-1/videos
- https://www.youtube.com/c/nexcessnet-1/playlists
Resources for More Information
Need more help? The Applications > Magento 2 and Magento 1 sections within the Nexcess Knowledge Base are important resources for those seeking additional knowledge. Or, check out our related articles below.
Support: 24-Hour Assistance
If you need any assistance with the above-mentioned, don't hesitate to reach out. For 24-hour assistance any day of the year, Nexcess customers can contact our support team by email or through your Client Portal.
New Customers: Fully Managed Hosting Solutions
Not a Nexcess customer yet? Check out our fully managed hosting solutions. The option to chat with an expert is also available.
Related Articles
- Magento 2 Help
- Magento 2 Hosting
- Nexcess Scope of Support - Magento 2
- The Ultimate Magento 2 Checklist for Performance
-
Magento 2 Optimized - Ebook