Run a WordPress-based Site on a Windows Server

1
33487
Run a WordPress-based Site on a Windows Server
Word-pressLet’s go through the process of installing and running a WordPress-based site on a Windows server.

WordPress is open source content management software that is very widely used across the world to create websites and blogs. One of the major advantages of WordPress is its plug and play architecture. Its versatility and millions of plugins allows you to customise your sites and gives you a competitive edge. Currently, there are many e-commerce and private social network sites that use WordPress.

WordPress can either be used online at www.wordpress.com or accessed as a downloadable version at www.wordpress.org.
Though it is open source software, it can be hosted either on an open source-based platform or on a Windows-based Web platform, in order to build custom sites. Microsoft provides a robust Web platform and a set of comprehensive tools which can be used to host WordPress.  Microsoft’s Web platform interface for hosting WordPress is the key focus of this article.

An introduction to Web Server Roles or IIS  
The Microsoft Windows Server family provides numerous server roles that can handle complex IT tasks. One of the main roles used in configuring and managing Web-based applications is the Web Server Role or Internet Information Services (IIS). Windows’ Web Server Role lets you share information with users on the Internet, an intranet, or extranet, using sites, pages, etc. Using this, you can deploy and manage websites and applications across large farms of Web servers from a central place. One of the major advantages of using IIS is its scalability and open architecture.

Windows Server 2008 and Windows Server 2008 R2 deliver IIS 7, which is a unified Web platform that integrates IIS, ASP.NET, Windows Communication Foundation and Windows SharePoint Services. Microsoft introduced IIS 8.5 with Windows Server 2012 R2, which has helped it improve support for organisations that have a large number of websites to manage.

Prerequisites for hosting WordPress on a Windows-based system  
Before you install WordPress with Microsoft Web Platform, ensure that the following prerequisites are in place on your Windows system.
WordPress prerequisites: http://wordpress.org/about/requirements/
IIS prerequisites: http://msdn.microsoft.com/en-us/library/cc268240.aspx 
Installing WordPress on a Windows-based system
Microsoft WebMatrix and Microsoft Web Platform Installer (Web PI) are two very effective tools from Microsoft that automate the installation of WordPress. With these tools, you have the option to install not only Microsoft-based Web components but also a huge set of open source applications and built-in templates. Both these tools can be used to successfully install and host WordPress on a Windows-based system in order to create, publish and maintain your websites. These tools install the latest components of the Microsoft Web Platform including Internet Information Services (IIS), SQL Server Express, .NET Framework and Visual Web Developer.

To host a site from a Windows-based system using WordPress, you will need to install one of the following tools and use it to download and install WordPress and all the other required applications. Given below are the basic guidelines for installing WordPress using these tools. Ensure that your system is connected to the Internet before starting the process. You can also download all the required components offline and install WordPress. Using an online method with these tools is recommended, as it always fetches the data dynamically and allows you to install the latest supported components.

Using Microsoft WebMatrix  
1.     Download and install Microsoft WebMatrix from http://www.microsoft.com/web/gallery/install.aspx?appid=webmatrix on your system. It will automatically install the other additional components like IIS and Microsoft SQL Server Express.
2.    Once installed, you can just open Microsoft WebMatrix and click on ‘Site from Web Gallery’ to select WordPress for installation.
 Note: With WebMatrix 3, just after installation, you will have to select New->App Gallery to open the option ‘Site from Web Gallery’.

3.    As prerequisites, along with WordPress, it also downloads and installs MySQL and PHP packages automatically.
4.    WordPress needs a database to be installed for data management. So you can create a new database using the MySQL database that was downloaded and installed.
5.    During the process, you might have to set the credentials for accessing the database that will be used by WordPress.
6.    Once the WordPress installation is complete, open the WebMatrix site workspace to launch your WordPress site by clicking on the ‘Run’ button. This page gives you the URL or permalink of your site.
7.    Here you can also access the source PHP pages for your site from the files workspace. You can modify the pages as per your requirement and once you have modified them, you will have to click on ‘Run again’ from WebMatrix to launch your site.
8.    Your site has now been launched using the default Web browser (e.g., Internet Explorer).
9.    Now log in to your site using the required credentials and access the WordPress dashboard to modify your site. For detailed steps on how to use the WordPress dashboard, visit Reference 6 below.
For a detailed step by step guide refer to http://www.microsoft.com/web/post/your-first-website-using-webmatrix.
Using Microsoft’s Web Platform Installer (Web PI)
1.     Download and install Microsoft’s Web Platform Installer from http://www.microsoft.com/web/downloads/platform.aspx on your system.
2.    Under the ‘Applications’ category in the Web PI, you can add a set of open source applications to install them in your system. Add ‘WordPress’ to install it on your system.
3.    The Web PI also downloads and installs MySQL and PHP packages along with WordPress.
4.    As mentioned above, you will need to create a new database that can be used by WordPress to store its contents.
5.    Now you can open an Internet Explorer page and access your WordPress dashboard by opening your site as
http://localhost/<your site name>.
6.    At this page, provide the required information to complete the WordPress installation.
7.    Now you can log in to your site using the required credentials and access the WordPress dashboard to modify your site. For detailed steps on using the WordPress dashboard, visit http://codex.wordpress.org/Administration_Screens (see References at the end of the article).
For a detailed step by step guide, refer to http://codex.wordpress.org/Installing_on_Microsoft_IIS.
Once you have created, modified and published your site using WordPress, it can be accessed using your system’s hostname or IP address.

Tips and best practices

You can create either a self-hosted site or a free site at WordPress.com. While a self-hosted site may require some initial investment and maintenance costs, a free site may not be best suited for all your requirements as the URL for the site will be something like yoursitename.wordpress.com. So depending on the purpose of your site and your budget, make your choice.

Make a habit of updating your WordPress version, as well as your site, to avoid any security vulnerability. But make sure you have proper backup for your site. For WordPress backup options, refer to http://codex.wordpress.org/WordPress_Backups.
 
Windows Live writer is another free tool from Microsoft, which can be integrated with WordPress to easily modify your WordPress site’s contents and to add pictures or videos. You can download it from http://www.microsoft.com/en-in/download/details.aspx?id=8621.

For a comprehensive list of WordPress best practices, do refer to http://vip.wordpress.com/documentation/best-practices/.  
 
References
[1]    http://codex.wordpress.org/First_Steps_With_WordPress
[2]     http://codex.wordpress.org/Working_with_WordPress
[3]    http://easywpguide.com/
[4]     http://www.iis.net/
[5]     http://www.microsoft.com/web/downloads/
[6]     http://codex.wordpress.org/Administration_Screens  

Previous articleEmbark on Your Programming Journey with AMP
Next articleMongoDB: The Most Popular NoSQL Database
Barun Chaudhary is a lead engineer in the Enterprise Operating System group at Dell India R&D Centre, Bengaluru. He has 7+ years of experience in the Windows operating system and on server virtualization technologies. His areas of interest cover virtualization and cloud computing technologies.
Gobind Vijayakumar works in the OS Engineering group at Dell India R&D Centre, Bengaluru, and has 5+ years of experience in Windows Server operating system and its applications. His interests include server, storage and networking technologies.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here