All Products
Search
Document Center

Elastic Compute Service:Build a WordPress website on a Windows instance

Last Updated:Mar 19, 2026

WordPress is a free, open-source content management system (CMS) for building websites such as blogs, news sites, e-commerce stores, and social media platforms. This topic describes how to deploy WordPress on an Elastic Compute Service (ECS) instance running Windows Server by setting up a WIMP environment (Windows, IIS, MySQL, PHP), installing WordPress, and optionally configuring a custom domain name.

Prerequisites

Before you begin, make sure that you have:

  • Windows Server 2022 (or another supported version). The graphical interface may vary depending on the operating system version.

  • A public IP address automatically assigned to the instance, or an elastic IP address (EIP) associated with it. For instructions, see Enable public bandwidth.

  • Inbound security group rules that open the following ports: For instructions, see Add a security group rule.

    Port

    Purpose

    80

    HTTP traffic for the WordPress website

    3389

    RDP access to the Windows instance

Important

Open ports only as needed. For example, to connect to a MySQL database on the instance, add an inbound rule to open port 3306 (the default MySQL port).

Step 1: Set up the WIMP environment

WIMP stands for Windows, Internet Information Services (IIS), MySQL, and PHP. Install each component before you proceed.

Important

Each WordPress version requires specific PHP and MySQL versions. Incompatible versions may cause installation failure. Check the WordPress Compatibility page before you choose versions. This tutorial uses WordPress 6.4.4, IIS 10.0, MySQL 8.0, and PHP 8.0.

Install the three components using the following guides:

Component

Guide

IIS

How to install IIS and FTP services on Windows instances

MySQL

Deploy a MySQL database on an ECS Windows instance

PHP

How do I use IIS to build a PHP environment on a Windows instance?

Step 2: Download and extract WordPress

  1. Connect to the ECS instance. For instructions, see Use Workbench to connect to a Windows instance over RDP.

  2. Download the WordPress 6.4.4 installation package from the official WordPress website.

    Note

    This tutorial uses WordPress 6.4.4. Visit the official WordPress website for other versions. If you download from an instance in a region inside the Chinese mainland and receive the 429 Too Many Requests error, retry or download the package from a third-party website.

  3. Extract the installation package. In this tutorial, the package is extracted to C:\wordpress-6.4.4\wordpress.

Step 3: Create a MySQL database

  1. Navigate to the bin folder of the MySQL installation directory. In this example, the path is C:\BtSoft\mysql\MySQL8.0\bin.

  2. Hold the Shift key, right-click a blank area in the folder, and select Open command window here.

  3. Log in to MySQL: Enter the root password when prompted.

       .\mysql -u root -p
  4. Create a database named wordpress:

       create database wordpress;

Step 4: Configure WordPress

  1. In the C:\wordpress-6.4.4\wordpress directory, copy wp-config-sample.php and rename the copy to wp-config.php.

  2. Open wp-config.php in a text editor and update the database connection fields:

    • Database name (DB_NAME): wordpress

    • Database user (DB_USER): your MySQL username (for example, root)

    • Database password (DB_PASSWORD): your MySQL password

  3. Save and close the file.

Step 5: Configure IIS for WordPress

  1. Open the Start menu. In the Windows Server section, click Server Manager.

  2. In the top navigation bar of the Server Manager window, choose Tools > Internet Information Services (IIS) Manager.

  3. In the Connections pane, expand < ECS instance name> > Sites.

  4. Remove or reassign any website currently bound to port 80: In this example, the website named 127.0.0.1 bound to port 80 is deleted.

    • Delete the existing website bound to port 80, or

    • Change its port to an unused number (for example, 8088).

  5. In the Actions pane on the right, click Add Website and configure the following parameters:

    Parameter

    Value

    Site name

    wordpress

    Physical path

    C:\wordpress-6.4.4\wordpress

    Port

    80

Step 6: Install WordPress

  1. On the Windows instance, open a web browser and go to http://localhost/ to launch the WordPress installation page.

  2. Fill in the site information:

    Field

    Description

    Example

    Site Title

    Name of the WordPress website

    demowp

    Username

    Admin login username (choose a secure name)

    testwp

    Password

    Admin login password (use a strong password)

    --

    Your Email

    Email address for notifications

    example.com

  3. Click Run the installation.

  4. Click Install WordPress.

  5. Enter the username and password you specified during installation and click LOGIN.

You are now logged in to your WordPress dashboard. For more information about using WordPress, see the WordPress documentation.

Configure a domain name

Using a public IP address to access your WordPress website exposes the instance directly. To improve security, bind a domain name instead.

Register a domain name

Register a domain name through Alibaba Cloud. For instructions, see Register a domain name on Alibaba Cloud.

Apply for an ICP filing (Chinese mainland only)

If the ECS instance is in a region inside the Chinese mainland, apply for an Internet content provider (ICP) filing before you use the domain name. For instructions, see ICP filing process.

Resolve the domain name

Point the domain name to the public IP address of the ECS instance. For instructions, see Get Started.

For answers to frequently asked questions about DNS resolution, see FAQ about DNS resolution issues.

Update WordPress to use the domain name

  1. Connect to the ECS instance. For instructions, see Overview of ECS remote connection methods.

  2. Navigate to the C:\BtSoft\mysql\MySQL8.0\bin folder. Hold the Shift key, right-click a blank area, and select Open command window here.

  3. Log in to MySQL: Enter the root password when prompted.

       mysql -u root -p
  4. Switch to the WordPress database:

       use wordpress;
  5. Update the site URL. Replace http://www.example.com with your actual domain name:

       update wp_options set option_value = replace(option_value, 'http://localhost', 'http://www.example.com') where option_name = 'home' OR option_name = 'siteurl';
  6. Exit MySQL:

       exit;

The domain name is now configured for your WordPress website.

FAQ

Why can I not access the WordPress website through the public IP address?

Possible causes and solutions:

References