Windows Hosting runs PHP as well as ASP.NET, so you can host a PHP site, or add a PHP tool such as a WordPress blog alongside an ASP.NET site in the same package. PHP runs under IIS through FastCGI and connects to MySQL databases created in StackCP.
It works well for many sites, but there are real differences from Linux hosting that you should know before you choose it for a PHP project.
What is different from Linux hosting
| Area | Linux Cloud Hosting | Windows Hosting |
|---|---|---|
| Web server config | .htaccess | web.config (.htaccess is ignored) |
| URL rewriting | mod_rewrite | IIS URL Rewrite rules |
| File names | Case-sensitive | Not case-sensitive |
| ionCube Loader | Available | Not available |
| Permissions | chmod (755/644) | Windows access control lists; no chmod |
| SSH, WP-CLI, Composer over SSH | Available | Not part of Windows Hosting |
Choose Linux hosting instead if…
- the site is only PHP (WordPress, WooCommerce, Laravel, Joomla, a PHP script) with no ASP.NET or MS SQL parts;
- you rely on plugins that write
.htaccessrules, such as many caching and security plugins; - your software is encoded with ionCube (many licensed PHP scripts and billing or school management systems);
- you want SSH, WP-CLI or Composer on the server.
Most PHP software is developed and tested on Linux, so it runs with fewer surprises there. Our WordPress Cloud Hosting and Cloud Hosting plans are built for this. See Linux or Windows Hosting: Which Does Your Website Need?. If you want to change plans, ask our Sales team.
Choose Windows Hosting for PHP when…
- your main site is ASP.NET or Classic ASP and you want a small PHP app (a blog, a forum, a form handler) in the same package;
- a PHP script must read the same MS SQL database as your .NET site (PHP connects to SQL Server with the
sqlsrv/pdo_sqlsrvextensions, if they are enabled on the server; ask support to confirm before you build on them).
PHP version and settings
Check your PHP version by uploading a file called info.php containing <?php phpinfo();, opening it in your browser, then deleting it straight away (it reveals server details). If StackCP shows a PHP version option for your Windows package, you can change it there; otherwise ask support which versions are available.
PHP running under FastCGI reads a .user.ini file in your site folder, so you can usually adjust common settings like this:
; .user.ini in the web root upload_max_filesize = 64M post_max_size = 64M memory_limit = 256M max_execution_time = 120
Changes can take a few minutes to apply, because PHP caches the file. For uploads larger than about 28 MB you also need to raise the IIS limit (maxAllowedContentLength) in web.config; see web.config Essentials.
Installing WordPress on Windows Hosting
- Create a MySQL database in StackCP (Web Tools → MySQL Databases) and note the hostname shown there. It is not
localhost. - Download WordPress from wordpress.org, unzip it on your computer and upload the contents of the
wordpressfolder to your web root with FTP. - Visit your site and run the installer. Enter the database name, username, password and the database hostname from step 1.
- Create the
web.configbelow so pretty permalinks work.
web.config for WordPress permalinks
WordPress normally writes rewrite rules to .htaccess, which IIS ignores. Without this file, every page except the home page returns 404 when you use “Post name” permalinks:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WordPress" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> <defaultDocument> <files> <clear /> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration>
Then go to Settings → Permalinks in WordPress and click Save Changes. For WordPress in a sub-folder (for example /blog), put this web.config inside that folder.
WordPress tips on IIS
- Email: use an SMTP plugin with a real mailbox rather than PHP
mail(). See WordPress SMTP Plugin Settings for FimuroHost Email. - Plugins that edit .htaccess (redirects, security hardening, caching) do nothing on IIS. Add the equivalent rules to
web.configyourself; see URL Rewrite Rules in web.config. - Updates and media uploads failing usually mean WordPress can't write to a folder. See File and Folder Permissions for Uploads.
- HTTPS: after activating SSL, change both addresses in Settings → General to
https://.
Common problems
- 404 on every page except the home page. The permalink
web.configis missing. - “Error establishing a database connection”. The database host is set to
localhostinwp-config.php. - A script asks for the ionCube Loader. It can't run on Windows Hosting; use Linux hosting.
- The site downloads
index.phpor shows PHP code. Contact support so we can check PHP is enabled for your site.
Need help?
If something doesn't work as described, open a support ticket from your client area or message us on WhatsApp at 01818160926. Tell us your domain name and the exact error message, and we will take it from there.
Categories
Written by
FimuroHost Team
Technical Writer