Help Center/ Huawei Cloud Flexus_Huawei Cloud Flexus L Instance/ Best Practices/ Best Practices of Earlier Versions/ Using PrestaShop to Build an E-Commerce Website (Historical Version)
Updated on 2026-08-27 GMT+08:00

Using PrestaShop to Build an E-Commerce Website (Historical Version)

Scenarios

PrestaShop is a versatile, cross-platform open-source e-commerce solution built on PHP and MySQL. PrestaShop supports transactions in multiple currencies and almost all payment methods, including Paypal. It is a good choice for you to build cross-border e-commerce websites. FlexusL provides a PrestaShop application image running on Ubuntu 24.04 and deployed with Docker. The image comes pre-installed with Nginx, MySQL, phpMyAdmin, and Docker. This section describes how to use PrestaShop to build an e-commerce website.

This practice applies to FlexusL instances with a PrestaShop application image purchased before August 28, 2026. For best practices of the new image version, see Using PrestaShop to Build an E-Commerce Website.

To update the image version, change the OS. This operation will clear the data on the original system disk. Back up the data in advance.

Prerequisites

You have purchased a FlexusL instance with a legacy PrestaShop application image.

Step 1: Configure Security Groups

Add inbound security group rules to ensure that the application preinstalled in the image can be accessed.

  1. Log in to the FlexusL console and click the target resource card or instance name to go to the instance details page.
  2. In the navigation pane on the left, choose Cloud Servers and click the target server name to view its details.

  3. On the Security Groups tab, click Add Rule to add the rules listed in the following table.

    The following only lists common rules. You can add more rules as needed.

    Table 1 Security group rules

    Priority

    Action

    Type

    Protocol & Port

    Source

    Description

    1

    Allow

    IPv4

    TCP: 80

    0.0.0.0/0

    Specifies the internal forwarding port of application images

    1

    Allow

    IPv4

    TCP: 3306

    0.0.0.0/0

    Allows access to MySQL databases.

    1

    Allow

    IPv4

    TCP: 9000

    0.0.0.0/0

    Allows external access to the application O&M page.

    1

    Allow

    IPv4

    TCP: 9001

    0.0.0.0/0

    Allows external access to the application dashboard.

Step 2: Reset the Password

A FlexusL instance does not have an initial password. After creating a FlexusL instance, set a password for the FlexusL instance. This password is also used to log in to the O&M page of the application.

  1. In the Image area on the Overview page of the FlexusL console, click Access to go to the application dashboard and check whether the application has been up and running. If yes, go to the next step.

    Wait for several minutes until the application is up and running. Then, you can perform operations such as restarting or stopping the instance, or resetting the password. Otherwise, the initial password may become invalid and you cannot log in to the application dashboard.

    Figure 1 Access to the application dashboard

    When you click Access to go to the dashboard for the first time, PrestaShop generates a random character string following the dashboard address for encryption. Keep the encrypted dashboard address in mind. You can only use the encrypted address to log in to the dashboard and cannot access the dashboard from the console.

    For example, when you access the management console http://1.1.1.1:9001/admin for the first time, the address automatically changes to http://1.1.1.1:9001/admin923reep1k/index……, where the character string 923reep1k is added after admin. Keep the address http://1.1.1.1:9001/admin923reep1k in mind. (You do not need to record the part following admin923reep1k/)

    You can also reinstall the FlexusL instance to obtain the new dashboard address, but the original data will be lost. Therefore, keep the encrypted address in mind.

    After the application is started, the initialization wizard page of the dashboard is displayed.

    Figure 2 Initialization wizard page of the PrestaShop dashboard

    If the dashboard is not properly displayed, check the following causes:

    • The port for accessing the dashboard is not enabled. Enable it as needed.
    • The dashboard is being started. Try again later.
  2. Locate the resource card and choose > Reset Password. Alternatively, in the list view, click Reset Password in the Operation column to reset the password for the FlexusL instance.

    For details, see Resetting the Password for a FlexusL Instance.

    Figure 3 Resetting a password

    The password for logging in to the FlexusL instance is also the password for logging in to the application O&M page.

Step 3: Initialize PrestaShop

Application images use code-based Ubuntu. They provide graphical user interfaces to make your operations easier. You need to initialize the application dashboard upon the first login. Then you can directly log in to the dashboard from the FlexusL console afterwards.

  1. In the address bar of a local browser, enter http://server-EIP:9000 to log in to the application O&M page.

    The initial username and password for logging in to the application dashboard are stored on the application O&M page. You need to log in to the O&M page first. The username for logging in to the O&M page is root, and the login password is the reset password.

    For details about the FlexusL instances, O&M page, and dashboard, see What Is the Relationship Among FlexusL Instances, the Dashboard, and the O&M Page?

  2. On the My Apps page, click the application icon, choose Access, and click Initial Account to view the username and password for logging in to the application management page.

    The initial password is a randomly generated strong password. After the application is initialized, change the password on the dashboard for easy management. If the password is changed, the initial password will be invalid. Remember the new password.

  3. On the Overview page, click Access in the Dashboard field in the Image area.

    If the dashboard is not properly displayed, check the following causes:

    • The port for accessing the dashboard is not enabled. Enable it as needed.
    • The dashboard is being started. Try again later.
  4. Enter the password obtained in 2.
    Figure 4 Initialization wizard page of the Prestashop dashboard
  5. Click LOG IN to log in to PrestaShop.

After the Prestashop application is initialized, you can deploy your applications on the dashboard.

Step 4: Deploy PrestaShop

PrestaShop has a built-in multi-language system. You only need to select the corresponding language and import it to your PrestaShop system online.

  • Import a language package.
    1. Choose IMPROVE > International > Localization, select the language package you want to import, and click Import.

    2. Click the Languages tab to view the language packages that have been imported.
  • Set the language of the dashboard.

    Click the avatar on the right corner, select Your profile and set the language. Click Save.

  • Delete a language package.
    You can delete unnecessary language packages.
    1. Choose International > Localization > Languages and disable the language package you want to delete.

    2. In the Actions list, click Delete to delete the language that is disabled.

PrestaShop has a rich module library, which greatly expands the functions of PrestaShop.

  • Choose Modules > Marketplace, find the required plug-in, and click Buy Now or Install to purchase and install the module.

    You can also click Upload a module to install other modules.

  • Choose Modules > Module Manager.
    • On the Modules tab page, you can disable, configure, uninstall, and restore the modules.
    • On the Alerts tab page, you can view the notifications of modules.
    • On the Updates tab page, you can view modules that can be updated.

PrestaShop allows you to back up databases.

  1. In the navigation pane on the left, choose Advanced Parameters > Database > DB Backup, read the disclaimer, and click I have read the disclaimer. Please create a new backup.

    You can follow the instructions on the following page to restore a database.

  2. Click Download the backup file to download the backup file to your local PC.

Add and resolve a domain name for the website so that users can use the domain name to access the website. If the website is only used for personal development or testing, there is no need to add a domain name.

  1. If the domain name is not registered with Huawei Cloud or not resolved on Huawei Cloud DNS, the domain name cannot be resolved. Use either of the following methods to resolve the issue:
    • Contact the DNS service provider to add an A record that maps the domain name to the EIP of the FlexusL instance.
    • Use Huawei Cloud DNS servers to resolve the domain name. For details, see Migrating DNS Settings to Huawei Cloud DNS.
  2. Add the domain name on the application O&M page.
    1. In the address bar of a local browser, enter http://EIP:9000 to log in to the application O&M page.

      The username and password for logging in to the dashboard are the root user and password of the FlexusL instance. A FlexusL instance does not have an initial password. Reset the password and use it to log in to the dashboard.

    2. Choose My Apps and click the App icon.
    3. Choose Access and click Add Domain.

  3. Apply for ICP licensing for the domain name.

    To successfully access the server using a domain name, you must license the domain name. Domain name licensing provided by the ICP License Service is free of charge. For details, see ICP Filing Process.

    After the domain name is licensed, you can use it to visit the website.