Azure Websites: WordPress + SQL Azure + Azure Storage

I’ve received several requests about working with WordPress and SQL Azure. That’s why I’d like to dedicate this post to show you an option available in the Microsoft Azure marketplace for this scenario. We can also make use of Azure Storage for storage our media content, which usually has an important size on blogs with tons of information.

Brandoo WordPress

Brandoo WordPress

There is a project called Brandoo WordPress that allows us to work with SQL Azure and MariaDB. This project is available from the Azure Websites gallery by selecting New > Compute > Website > From Gallery > Brandoo WordPress (MS SQL or SQL Azure):

Brandoo WordPress (MS SQL or Azure SQL)

If we follow the wizard, you can choose or create a database in SQL Azure:

Configure Brandoo WordPress

Once the wizard is completed, we’re ready to use WordPress using SQL Azure as a database instead of MySQL.

WordPress Update

When you access for the first time to the new site, we can see that you are not using the latest version of WordPress (Today 4.0.1). The version of the project that is in the marketplace is not the latest version, though we can fix it easily from the Dashboard:

Brandoo Update WordPress

Azure Storage for media content

Finally, I would like to add Azure Storage for storage of media content. I know firsthand the many images, videos, files, so that you can get stored in a CMS and is why it would be more than recommended hosting this type of content in a place outside the site, improving Thus the performance of the site. To do this, simply search the Windows Azure Storage for WordPress plugin using Plugins > Add New .

Windows Azure Storage for WordPress

Once installed, a new tab will appear in the Settings section called Windows Azure WordPress:

Wordpress Settings Windows Azure

If you don’t have an Azure Storage account you can create it through New > Data Services > Storage. In the new section, must include the account name and the primary access key to connect. Also, we need to create a container (in this example I have called media) to allocate the content:

Mandatory Windows Azure Storage Settings

It is very important to check the Use Windows Azure Storage for default upload option before saving the changes, because otherwise it won’t be the default destination when we upload new items:

Wordpress Use Windows Azure Storage for default upload

From this point, if we modify the post template and we add, for example, a new image we can verify that Azure Storage is the default storage location:

Wordpress Azure Storage result

Hope this helps.

Cheers!