Updated on 2023-12-13 GMT+08:00

Getting Started

(Optional) Modifying Security Group Rules

  • This solution uses port 22 to remotely log in to the ECS. By default, the VPC subnet created in this solution allows access from port 22. To configure an IP address whitelist, see Modifying a Security Group Rule.

A security group is a collection of access control rules for cloud resources, such as cloud servers, containers, and databases, to control inbound and outbound traffic. Cloud resources associated with the same security group have the same security requirements and are mutually trusted within a VPC.

You can modify the security group policy, for example, by adding, modifying, or deleting a TCP port, as follows:

  • Adding a security group rule: Add an inbound rule and enable a TCP port if needed.
  • Modifying a security group rule: Inappropriate security group settings can be a serious security risk. You can modify security group rules to ensure the network security of your ECSs.
  • Deleting a security group rule: If the source or destination IP address of an inbound or outbound security group rule changes, or a port does not need to be enabled, you can delete the security group rule.

(Optional) Changing the MySQL Database Password

  1. Log in to the ECS console, locate the created ECS, and click Remote Login to log in to the Linux ECS.

    Figure 1 Remote login

  2. On the Linux ECS, enter the username and password and press Enter.

    Figure 2 Logging in to the ECS

  3. Run the mysql -u root -p command to log in to the MySQL database as user root. Then, press Enter and enter the password. Then run the SET PASSWORD command to change the password: set password for root @localhost= password ('new password').

    Figure 3 Changing the password of the MySQL root user

  4. To change the password of the MySQL user database, log in to the MySQL database, enter grant all on wordpress.* to wordpressuser@localhost identified by 'new password';, and press Enter. Then run the exit command to exit the MySQL database.

    Figure 4 Changing the password of the MySQL user database

Initializing WordPress

To deploy this solution, perform steps 1 to 6. To purchase a domain name, perform steps 7 to 9.

  1. Choose Stack > Outputs on the WordPress page, open Google Chrome, and enter the URL displayed after the deployment is successful. Then the WordPress installation wizard is displayed.

    Figure 5 Output URL

  1. Configure the database as prompted and click Let's go.

    Figure 6 Installation wizard

  1. In the displayed dialog box, enter the database connection details, such as the username and password, and click Submit. The database verification is successful.

    Figure 7 Database connection details

  2. After the verification, the installation page is displayed. Click Run the installation.

    Figure 8 Installation page

  3. Set the site title, administrator username, password, and email address. Then, click Install WordPress.

    Figure 9 Setting parameters
    Figure 10 Successful installation

  4. Click Log In. Alternatively, enter http://Server IP address/wordpress/wp-admin in the address bar of the browser, enter the username and password, and click Log In.

    Figure 11 WordPress login page
    Figure 12 WordPress page

  5. Purchase a domain name.

    To make the website easy to access, configure a unique domain name for the website. You are required to obtain an authorized domain name from the domain name registrar for the website.

  6. Complete ICP filing.

    If your website does not have an ICP filing and needs to be hosted on Huawei Cloud, use the Huawei Cloud ICP filing system. For details, see ICP Filing Process.

  7. Configure DNS records.

    Your website can be visited using the registered domain name only after DNS records are configured. For details, see Routing Internet Traffic to a Website. For example, if the domain name is www.example.com, enter http://www.example.com in the address bar of the browser to access the website.