WordPress on Windows – Issues & Solutions

wordpress-on-windows

WordPress is more than just a blogging platform today. It is one of the best open source CMS platforms one can use for their site. It is undoubtedly the most used and loved CMS around the world. It offers all the benefits of a CMS. In addition it also offers a thriving community of plugin developers and theme designers that make WordPress all the more popular. All these factors make WordPress stand out from its competitors. Of course, the thriving ecosystem itself is the result of wider WordPress acceptability and its ease of use. So the actual credit goes to WordPress of course.

WordPress is open source and is released under the GPL license. Keeping with its open source philosophy, it is free to use and also allows free distribution of the software. It has been developed using PHP and runs best on Linux operating systems. Microsoft has done a good job over the years of supporting WordPress on Windows servers. And they must be appreciated for this as it has helped many on Windows hosting to take advantage of the most popular blogging platform today. Over the years, the support for WordPress on Windows has only gotten better.

Need Help With Your Website Banner

In earlier version of Windows the support was quite minimal. And one had to be quite technical to get everything working smoothly. It was quite a drawback, and stopped many from using Windows for WordPress. Only those stuck on a Window server and desperately needing WordPress would have opted for it. But things are quite smoother now. Installing and setting up WordPress on Windows servers is a breeze. Just like CPanel on Linux, Plesk from Parallels for Windows today comes with one click installation of WordPress. Making setting up WordPress on Windows a breeze.

If your web server is installed with Plesk or other hosting automation software like WebsitePanel, then you can safely assume that PHP and MySQL are also installed on your server. You need these technologies to run WordPress. Another major issue used to be with permalinks. It just refused to work on windows. However, that too is in the past now.

Listing below are a few of the hurdles that make people stay away from Windows when it comes to WordPress.

Url Rewriting

This module is required for permalinks, i.e. clean URLs, without parameters. If you go with shared windows hosting, then you can safely assume that it is already configured and ready for use. However, if you go with Cloud Computing or Dedicated Servers, then in my experience, you usually have to install it yourself. As with these type of hosting, you are expected to configure a lot of services yourself. Unless otherwise, you opt for a fully managed server.

Even if the box comes loaded with Plesk or some other hosting automation software, the URL Rewrite module is missing and you need to download and install it yourself. Installation of new components on windows using the Web Platform Installer is a breeze.

If you are on shared hosting, as most people are. Then the hosting will be pre-configured for you to use this service. And you won’t need to do anything additional on your part.

Enable Pretty Permalinks

Once WordPress is hosted and you log into the Dashboard, it is time to switch on the permalinks now. At this point, you should have both URL Rewriting module and FastCGI installed. Without FastCGI, your permalinks won’t work.

On Linux, you choose the permalink structure you want. And the rewrite rules automatically get written to the .htaccess file. On Windows, the configuration file is called web.config and it does not get created automatically. You will need to choose the rewrite rule and generate the web.config file yourself.

Click here to view the web.config file content that you need, if you are using the permalink structure shown in the subsequent screenshots below. Open a text editor like notepad, copy paste the content from the file above and save it as web.config and place it in the root of your WordPress installation.

permalink-with-index-php

You have come a long way now. However, looking at the image above, the permalinks still do not look too pretty, as you can see it comes appended with an index.php in the middle of the URL. This is not what we want. We want a clear URL. Another reason why this is undesirable is when you are shifting from Linux based hosting. And you want your permalinks to be exactly how it used to be earlier. You don’t want to lose all your page authority for those pages. Because if the URL change, the page is no longer the same page. You will need to 301 redirect the old pages to the new URLs. Therefore, it is desirable to keep the URLs same.

If you having the issue with index.php being appended to your URLs. Then the below solution could work for you. Within your wp-admin folder, there is a file called options-permalink.php. Open this file and around line 79 and 81, you will find this syntax:

$prefix = '/index.php';
Change it so it reads:
$prefix = '';

That is, simply remove the /index.php from the syntax above. Upload the file back to your server again, and refresh the Permalinks page in your WordPress dashboard. Your permalinks page should look like the image below. There is no index.php in the permalink structure now.

permalink-without-index-php

File Permissions

I have noticed on Linux hosting that you do not need to set any permissions for the wp-content folder. This is the folder where the content generated by you and your users is stored. It is writable by default on Linux based servers.

However, on Windows, you have to explicitly set permissions for this folder. Which perhaps makes it more secure than Linux based hosting, but more difficult to use. You need to give full permissions to IUSR account on wp-content folder. There are no other permissions required. Please see the image below for reference.

IUSR permissions through Plesk for WordPress

The image above is from the “Setup Access Permissions” page on Plesk. Your options may look a little different depending on the tool you are using to set permissions. Once done, you can upload images, files and also automatically update plugins from the Dashboard itself.

Updating WordPress

This is another big issue with WordPress on a windows server. While after the permissions are set, you can easily update plugins from the Dashboard. Much like you do on a Linux server. However, updating WordPress automatically does not work. One usually has to do it manually, which definitely is a pain. If anyone finds a solution to this, please do mention it in the comments below.

Hope this article helps those looking for information or to setup WordPress on Windows.

3 Comments

  1. I found your guide very useful and clear, thanks. I still feel a bit concerned about hosting WordPress on a Windows Server if I’m honest! I’m not great with Linux, so for now I guess I have no choice with my dedicated hosting.

    Reply
  2. I found setting modify permission for IUSR was the trick for enabling automatic updating (both WP itself and plugins). This was on a Server 2008 / IIS 7.0 system so for other versions YMMV. So far I have put this permission on the whole site – will need to see how far I can pare that down. I’ll post again once I have it down to the minimal requirement.

    Reply
  3. I am using this trick for my 7-8 websites and its working fine.. Thanks a lot… Great Work done.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *