How to install WordPress on IIS in Windows Server 2022
Install WordPress on a Windows Server with IIS to take advantage of this popular open-source content management system (CMS). WordPress makes website development easy and extensible with its free tools, plugins, and themes, all accessible through a single backend dashboard. To run efficiently on a Windows Server with IIS, WordPress requires an active database, a web server, and a dynamic script processor (PHP).
In this article, you install WordPress on a Windows server running the Internet Information Services (IIS) web server.
Prerequisites
- Windows Server 2012,2019,2022
- IIS
- PHP (latest version)
- MySQL (latest version)
Step 1. Login to your win server via RDP
Step 2. Install IIS (Internet Information Services) if you don’t have it on your server
IIS is very important to install WordPress on IIS in WIndows Server 2019.
Please see the link here for the IIS installation.
Step 3. Install PHP For WordPress To Work
You can follow the instructions here to install PHP and PHP manage on IIS
Select PHP Manager => Register new PHP version
=> folder is saving extracted PHP => OK
PHP version 8.3.17 information is successful.
Step 4: Install MySQL
You access the link below to download the MySQL installation file
Proceed to install MySQL=> Select Server only
In this installation step, the Microsoft Visual C++ 2019 Redistributable Package (x64) is not installed. Latest binary compatible version will be installed if agreed. Please access the link here to choose the correct installation package.
After installing Visual C++, select Execute to install MySQL
Select Next to continue the installation.
Select Server Computer, leave other options as default => Next .
Set root passwd for mysql, save this passwd you need to remember for next time.
Select Next to continue the installation.
Select Execute to check the configuration again
Select Finish to complete
Step 5: Proceed to Create Database and Create WordPress Website.
1. Proceed to create database using command
You open MySQL Command Line Client and run the following commands. And replace wordpress with your DB name, wpuser with your user.
create database wordpress;
use wordpress
create user 'wpuser'@'%' identified by 'password';
grant all on wordpress.* to 'wpuser'@'%';
flush privileges;
You need to enter root passwd and enter the command to create database and assign permissions.
2. Download WordPress Source Code
To download wordpress source code visit here.
Once you download the WordPress, you need to extract it.It is recommended to put your extracted files in wwwroot folder inside the Inetpub Folder.
As you can see in the below image, I extracted the WordPress zip file inside the wwwroot folder.
Now we have to rename the wp-config-sample.php file to wp-config.php and edit it.
Right-click on the wp-config.php file and edit with Notepad.
When you edit this file make sure you should have the database name, database user, and password.
As in our case we already created it in MySQL
So, we set the database as wordpress, user as wpuser, and password as password
3. Create Website And Download WordPress Source Code
First, open Internet Information Services (ILS) Manager.
Select Add Website to add a new site. And in this article I choose the domain name greencloudtest.com as an example.
Select OK to complete website creation.
Now go to binding from the right pane and click on Add
Now type the hostname as your website domain name, in our case, it is greencloudtest.com
Click on OK
To install WordPress on Windows open your browser and type the following URL: http://localhost/wordpress/wp-admin/install.php
Go to the domain name you set to install WordPress. Enter the Database information created above.
WordPress has been installed successfully.
Conclusion
Thank you for watching this tutorial on how to install WordPress on IIS Windows Server. Successfully deploying a WordPress website not only opens up new opportunities, but is also an important step in your journey to building and managing online content.