Menu

Free WordPress hosting on Azure

Yeah, this sounds freaking crazy, but it really is possible. Azure offers free hosting for up to 10 sites as long as you don’t exceed 5GB in traffic, you don’t use an SQL server, etc. Here’s how.

Go to the Azure website and click on the free trial link. Sign in with your Microsoft account or create one. Fill the subscription form. Make sure to have some $3-ish on your bank account because they’ll make a test charge to verify your identity.

Once the subscription’s created, open the Azure Portal. Go to New / Compute / Web site / Quick create, enter the site’s name and press Create web site. Once the website’s created, open it and click on Download the publish profile and save the given .PublishSettings file.

Now download the WordPress 3.2.1 zip from the WordPress Release Archive. Yes, you need this exact version, newer versions will not install correctly, but you’ll be able to upgrade afterwards. Now extract WordPress 3.2.1 to somewhere.

Also Download PDO for WordPress. Extract the files and folders inside the pdo-for-wordpress folder to wordpress\wp-content.

Rename wordpress\wp-config-sample.php to wordpress\wp-config.php and open it with an editor. Locate the

define('DB_COLLATE', '');

line and insert the following line after it:

define('DB_TYPE', 'sqlite');

Now open `wordpress\wp-content\pdo\wp_install.php** and locate the following line:

$message = __('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.');

Replace it with:

$message = __('<strong><em>Password</em></strong> ' . $random_password);

Now download and install WebMatrix 3 with default options, then start it. Click Open / Folder. Specify the extracted wordpress folder. It will show you a PHP Detected message and install all the required stuff automatically. Let it do its job. Once the site is created, click on Run and verify that the WordPress installer starts successfully. Now you gotta install WordPress on the localhost coz it would time out on Azure.

Fill the form. You don’t have to remember the password, it will be re-generated during install. When you’re ready, click Install WordPress. Once the installer finishes, it tells you your random password. Note it, click Log In and change your password to something you can remember. Go to the Dashboard and open Settings / General. Fix WordPress address (URL) and Site address (URL) to point to your Azure site address. Click Save Changes, then close the WordPress site.

Stop the site in WebMatrix. Click Publish, then click Import publish profile and specify the .PublishSettings file you downloaded from Azure. Click on Validate Connection and verify that it works correctly. Click Next, then click Continue twice. Now WebMatrix checks for changes. You may wish to check Delete files on the remote server that are not on my computer. Click Continue again. The publishing process begins and should finish within a minute.

Once the publishing’s complete, click on the provided hyperlink and check out your shiny new online WordPress instance. Now you can log in and update WordPress and anything related to their latest versions from the dashboard. Everything should be working fine. Enjoy!