Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Relational Database Service/ Best Practices/ RDS for MySQL/ Using RDS for MySQL to Set Up WordPress

Using RDS for MySQL to Set Up WordPress

Updated on 2025-01-23 GMT+08:00

WordPress is a blog platform developed based on PHP. It is usually used with RDS for MySQL database servers to help users build websites. This section describes how to set up WordPress in the Linux, Apache, MySQL and PHP (LAMP) environment using Huawei Cloud VPC, ECS, and RDS for MySQL.

  1. Configuring Network Information
  2. Buying an ECS
  3. Setting Up the LAMP Environment
  4. Buying and Configuring an RDS DB Instance
  5. Installing WordPress

Preparations

During the setup, you will use the following services or tools:

  • Cloud services: Huawei Cloud ECS and RDS for MySQL.
  • MySQL client: a database configuration tool
  • PuTTY: a remote login tool
NOTE:

The previous software is provided by third-party websites. The information is just for your reference and not for commercial use.

Configuring Network Information

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Choose Networking > Virtual Private Cloud.
  4. On the displayed page, click Create VPC to create a VPC, such as vpc-01.
  5. On the displayed page, enter a VPC name, set IPv4 CIDR Block to 192.168, select an AZ as required, and add a subnet. Retain the default settings for other parameters. Then, click Create Now. After the VPC is created, return to the network console.
  6. On the network console, choose Access Control > Security Groups and click Create Security Group. The following uses sg-01 as an example.
  7. On the Security Groups page, locate the target security group and click Manage Rules in the Operation column.
  8. Click Add Rule and add an inbound rule for the EIP bound to the ECS.

Buying an ECS

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Choose Compute > Elastic Cloud Server. The Elastic Cloud Server page is displayed.
  4. On the ECS console, buy an ECS.

    1. Configure basic settings: Select the pay-per-use billing mode, a region, and an image. Retain the default settings for other parameters.
      The public image CentOS7.4 64bit for P2v(40GB) is used as an example, as shown in Figure 1.
      Figure 1 Selecting an image
    2. Configure network: Select a VPC and security group, and purchase an EIP. Retain the default settings for other parameters.
      1. Select the created VPC vpc-01.
      2. Select the created security group sg-01.
      3. Select Auto assign for EIP.
    3. Configure advanced settings: Enter an ECS name and password, and click Next: Confirm.
      1. Enter an ECS name, such as ecs-01.
      2. Enter a password.
    4. Confirm: Confirm the information and click Next.

  5. After the ECS is created, view and manage it on the ECS console.

Setting Up the LAMP Environment

  1. Download the PuTTY client.
  2. Decompress the package, locate putty from the extracted files and double-click it.
  3. In the displayed PuTTY configuration dialog box, choose Session and specify basic options for your PuTTY session in the right pane. Then, click Open as shown in Figure 2.

    1. Enter the EIP of your ECS in the Host Name (or IP address) text box.
    2. Enter a session name in the Saved Sessions text box and click Save. Wordpress is used as an example. Retain the default settings for other parameters.
      Figure 2 Configuring PuTTY

  4. In the displayed login window, enter the ECS username and password to log in to ECS.
  5. Obtain the root permissions so that you can enter commands in PuTTY.

    Enter commands to install MySQL, PHP or other software. For example, run the following command to install PHP:

    yum install -y httpd php php-fpm php-server php-mysql mysql

    The installation is complete if the following command output is displayed:
    Complete

  6. Run the following command to install a decompression software:

    yum install -y unzip

  7. Run the following command to download and decompress the WordPress installation package:

    wget -c https://wordpress.org/wordpress-4.9.1.tar.gz

    tar xzf wordpress-4.9.1.tar.gz -C /var/www/html

    chmod -R 777 /var/www/html

  8. After the installation is complete, run the following commands to start related services in sequence:

    systemctl start httpd.service

    systemctl start php-fpm.service

  9. Enable automatic start of the service during system startup.

    systemctl enable httpd.service

Buying and Configuring an RDS DB Instance

  1. Buy a DB instance as required.

    • DB instance rds-01 is used as an example. Select MySQL 5.7.
    • Ensure that the RDS DB instance uses the same security group as the ECS so that you can access the RDS DB instance through the ECS.
    • Set the root user password and keep the password secure. The system cannot retrieve your password.

  2. Go to the RDS console. On the Instances page, click the target DB instance rds-01. The Overview page is displayed.
  3. Choose Databases in the navigation pane on the left and click Create Database. In the displayed dialog box, enter a database name, such as wordpress, select a character set, and authorize permissions for database users. Then, click OK.

    Figure 3 Creating a database

  4. Choose Accounts in the navigation pane on the left and click Create Account. In the displayed dialog box, enter the database username, such as tony, authorize permissions for database wordpress created in 3, enter the password and confirm the password. Then, click OK.

    Figure 4 Creating an account

Installing WordPress

  1. On the Elastic Cloud Server page, locate the target ECS and click Remote Login in the Operation column.
  2. In the Internet Explorer, enter http://EIP/wordpress in the address box and click Let's go!

    In the preceding URL, EIP indicates the EIP automatically assigned when you purchase the ECS in Buying an ECS.

    Figure 5 Visiting WordPress

  3. Enter database connection information and click Submit.

    • The database name is wordpress.
    • The username is tony.
    • The password is the one that you set for tony.
    • The database host is the floating IP address of DB instance rds-01.
    Figure 6 Entering database connection information

  4. After the database connection details are verified, click Run the installation.

    Figure 7 Running the installation

  5. Set Site Title, Username, and Password for logging in to your blog. Then, click Install WordPress.

    Figure 8 Setting basic information

  6. Click Log In after WordPress has been successfully installed.

    Figure 9 Successful installation

  7. Enter the username and password on the displayed login page. Then, click Log In.

    Figure 10 Logging in

  8. Check that WordPress has been deployed successfully.

    Figure 11 Verification

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback