Magento
Magento is one of the world's most popular ecommerce platforms, used for eCommerce . Magento delivers the features you need to build and grow a unique online store from the ground up.
Prepare
When referring to this document to use Magento, please read and ensure the following points:
-
Login to Websoft9 Console and find or install Magento:
- Go to My Apps listing applications
- Go to App Store installing target application
-
This application is installed by Websoft9 console.
-
The purpose of this application complies with the OSL-3.0 open source license agreement.
-
Configure the domain name or server security group opens external network ports for application access.
Getting started
Login verification
Completed the installation of Magento at the Websoft9 console, and get the applicaiton's overview and access credentials from My Apps
Switch to Chinese
Websoft9 has pre-built Magento's Chinese package file zh_Hans_CN
. To enable it:
Backend
- Log in to Magento as an administrator.
- Select Account Settings (at the upper right) > Interface Locale.
- Set Interface Locale to Chinese.
frontend
-
Enter the command mode of the Magento container and run the following command:
cd /bitnami/magento/
php bin/magento config:set --scope=stores --scope-code=default general/locale/code zh_Hans_CN
php bin/magento cache:clean
php bin/magento cache:flush -
Log in to Magento as an administrator, and navigate to: Stores > Configuration > General > Locale Options, then set Locale to Chinese.
Install extensions
Extensions are additional functionalities not part of Magento's core, including modules, language packs, etc.
They are installed by connecting to Magento's composer repository via PHP Composer. To install an extension, you need to enter the repository's Access Key.
Refer to: Install an extension
Setting up the Access Key
The Access Key is required for Magento to use Marketplace resources:
-
Register a Magento account, log in to Marketplace, and create your own Access Key from the Access Keys page of your Profile.
-
Create a new file named
auth.json
based onauth.json.example
in the root directory of your Magento application. -
Populate the auth.json file with the Access Key.
Caching and Indexing
After configuring Magento, you may need to refresh the cache or rebuild the index:
- Via the Magento backend: Navigate to
System
>Tools
. - Command line: Use the following commands:
php bin/magento cache:flush
php magento indexer:reindex
Configuration options
-
CLI: Use the command
magento list
-
Multilingual (✅ ): Download and import the language pack.
-
Online Backup: Configure via Stores > Configuration > ADVANCED > Backup Settings.
-
SMTP (✅ )
-
Refer to Email communications for SMTP parameters.
-
Fill in the sender's email address (matching the SMTP email address) under Backup > Store > Configuration > Store Email Address > General Contact.
-
Administer
-
Replacement of URL additional settings: After changing the Magneto domain name in the Websoft9 console, update the Magento URL via CLI
php bin/magento config:set web/unsecure/base_url http://www.mydomain.com/ # change to your actual domain name, must end with /
php bin/magento config:set web/unsecure/base_url http://www.mydomain.com/ # change to your actual domain name, must end with / -
Additional HTTPS settings: After setting up Magento's HTTPS in the Websoft9 console, configure it via CLI commands:
#1 set your url
php bin/magento setup:store-config:set --use-secure=1 --use-secure-admin=1 --base-url-secure="https://www.yourdomain.com/”
#2 flush cache
php bin/magento cache:flush -
Upgrade: Magento upgrades can be complex. Refer to the relevant documentation
Troubleshooting
Cron job warning?
Reason: One or more indexers are invalid. Ensure your Magento cron job is running
Solution: Rebuild the indexes and refresh the backend page.
php bin/magento indexer:reindex
Magento running slow?
Magento is a complex enterprise-level e-commerce system that requires significant computing resources.
Can't find the backend login?
Enter the Magento container and view or modify it using:
# Show Magento(URL)
magento info:adminuri
# Update Magento(URL)
magento setup:config:set --backend-frontname=[yourAdminUrl] -n
Redirection causing inaccessibility?
Description: Error message ERR_TOO_MANY_REDIRECTS in Magento admin
Reason: If redirection issues in the .htaccess
file are excluded, the most likely cause is the URL configuration
Solution: Change the URL via the command line or core_config_data datasheet
php bin/magento setup:store-config:set --use-secure=1 --use-secure-admin=1 --base-url-secure="https://www.yourdomain.com/”
php bin/magento cache:flush
After setting HTTPS, the page is messed up?
Description: The website is accessible, but the page layout is broken.
Solution:
php bin/magento maintenance:enable
# Delete static and cached files
php rm -rf var/di/* && rm -rf var/generation/* && rm -rf var/cache/* && rm -rf var/page_cache/* && rm -rf var/view_preprocessed/* && rm -rf pub/static/* && rm -rf generated/*
# Redeploy static files
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
# Rebuild index and cache
php bin/magento indexer:reindex
php bin/magento cache:clean && bin/magento cache:flush
php bin/magento maintenance:disable
Product detail page not displaying properly?
Description: The frontend can't display product information properly, showing the error “We can't find products matching the selection”
Reason: Investigation might reveal that the product attribute eanl3 field is abnormal.
Solution: Reset this field via STORES > Attributes > Product.