Deploy a WordPress website using Azure App Services

Reading Time: 7 minutes

Azure App Service, part of the Microsoft Azure Cloud platform is a fully managed service for building, deploying, and scaling your web apps. More details on this service can be located at Azure App Service

In this blog post I will go through the process of creating an Azure App Service plan and a MySQL database to host a demo WordPress site.

  1. Login to the Azure Portal
  2. Search and select App Services using the search box

3. Click + Create

4. Select you subscription from the drop down if you have more than one

5. Create a resource group and click OK

6. Select a unique name for your website domain. A green tick will be displayed if the name is available.

7. Using the run time stack drop down, select PHP 7.4 (Latest version at the time of writing this post)

8. For the the purpose of this demo, I have selected region UK South, and Linux for the Operating System.

9. Create a new service plan and click ok

10. Click change size

11. Review the available tiers. For the purpose of this demo, I have selected the dev/test version. Note that the test/dev version does not include a custom domain or SSL but you can always upgrade plans later. Click Apply,

12. Click Review + Create. Review the details and click Create

13. Deployment complete. Click Go to Resource and review the various options.

14. WordPress requires a MySQL database so let’s create a database. Using the search field, search MySQL and select Azure Database for MySQL servers

15. Click + Create

16. For the purpose of this demo, I have selected Single Server, but you’ll notice Flexible server was in preview at the time of writing this post.

17. Resource Group: I have selected the resource group I created earlier

18. Input a server name, select region and workload type as required

19. Click configure server and explore the various server sizes on offer. For the purpose of this demo, I have selected the cheapest one available. Don’t forget to delete your resources if you’re lab’ing 🙂

20. High Availability (Zone redundant HA) is not available with the tier i have selected.

Availability Zone: You can optionally specify an availability zone in which you deploy your database server to co-locate with your application

HA: provides enhanced availability for your mission critical workloads by deploying a standby server in a different availability zone within the same region as your primary server

As this is a demo, i won’t be configuring HA

21. Select MySQL version and input a database username and password. Click ‘Next: Networking

22. Click + Add current client IP address to add your public IP address to the firewall. Connections from the IP addresses configured in the Firewall rules section below will have access to this server. By default, no public IP addresses are allowed.

23. Click Review + Create. Review the information and click Create. That’s the MySQL Database deployed. We will need to hook the app service plan to the database later.

24. Return to the app service plan we created earlier, click the app service plan.

25. Whilst the MySQL database server is deploying in the background, we’ll connect to our app service via SSH and download WordPress. From the left blade, under Development Tools, select SSH

26. Click Go

27. Type:

cd site/wwwroot/ (enter)

28. We’ll now download the latest WordPress version from WordPress

Type: wget -c http://wordpress.org/latest.tar.gz (Press enter)

29. Type ls to check if the zip file is visible

30. We’ll now unzip the folder
Type: tar -xzvf latest.tar.gz

31. The above process has unzipped a folder name WordPress. We must move all files from inside the WordPress folder to wwwroot

Type: mv wordpress/* /home/site/wwwroot/

32. We can now delete the WordPress folder and the zip file

rm -rf wordpress/
rm -r latest.tar.gz

33. Next, we’ll connect to our MySQL database using the a free application MySQL WorkBench. You can download the tool from https://dev.mysql.com/downloads/workbench/

35. Install the MySQL WorkBench app. If not already installed you’ll be prompted to install C+ + 2019 Redistribute Package before you’re able to install MySQL WorkBench. https://visualstudio.microsoft.com/downloads/#microsoft-visual-c-redistributable-for-visual-studio-2019

36. Now that MySQL WorkBench has been installed, we can connect to MySQL in Azure. Click the plus icon to add a connection

37. Enter your MySQL details

– connection name: select a name of your choice
– hostname
– username
– Password

You can obtain the hostname and username from the Azure portal, search Azure Database for MySQL server, click your server name and copy the server name and username from the overview tab. If you did not make a note of your password, use the reset password option.

38. After inputting the details, test connection. We have a successful connection. Click ok and ok again.

39. Open your connection located under MySQL connections which will launch MySQL editor

40. Click Schemas

41. Right click sys and click create schema (This is required to allow WordPress to communicate with MySQL)

42. Input a name, copy the name to a notepad file as you’ll require it shortly. Click Apply

click apply again and finish

43. Return to your web app in the Azure Portal, click overview from the left blade, and then click browse.

44. WordPress has been detected and the install wizard launches. Select your preferred language.

45. Click Let’s Go

46. Input your MySQL details. The database name is the schema name you just created. The username and hostname (servername) can be obtained from your MySQL database on the Azure portal.

47. Click Submit

48. Success, click ‘run the installation’

49. Input site details and continue. Avoid using username of admin as this is the default for WordPress.

Done, you can now configure your WordPress site

Cloud Family Champion and Azure Heroes Award!

Reading Time: 3 minutes

The current pandemic has taken a toll on millions of people from around the World, motivation levels down, stress, burn out etc. I’m sure we’ll get through it!

I’ve had my moments but receiving two great awards in the same week helped boost my confidence and motivation levels! Topped up with the support from the Tech community on Twitter was an added bonus. Honored and thrilled to receive both awards. Thank you very much!

Cloud Family Champion
Firstly, i received the Cloud Family Champion award. Cloud Family is an initiative made up of a number of community members around the globe, with the aim of helping grow the Azure Community. It was an initiative founded by Microsoft MVP’s Gregor Suttie and Richard Hooper.

You can read more about me at Community Champion – June 2021 :: Cloud Family

Azure Heroes – Community Hero

Shortly after receiving the Cloud Family Champion award, a further award from Microsoft, Azure Community Hero! Wow! Thank you very much!

What is the Azure Heroes program

The Azure Heroes program uses non-fungible tokens (NFTs) to recognize and reward the inclusive behavior and contributions of the Microsoft technical community.

Individuals can earn a number of badges including,

Green Contributors support the growth of the sustainable software engineering field. Recipients of this badge drive innovation by building sustainable software and help educate the community by creating content and resources related to sustainable software engineering.

Inclusive Leader – Recipients of the ultra-rare Inclusive Leader badger are recognised for helping create environments in which all members and participants feel welcome and valued. From organizing diverse events and sharing resources, to educating community members on inclusion and offering accessible content, Inclusive Leaders promote the core value of inclusion in their work, events, and communities.

Content Hero badgers are given out for sharing valuable knowledge at conferences, meetups or other events. Recipients of this rare award have created original content, sample code or learning resources and documented and shared their experiences and lessons to help others to build on Azure.

OpenSourcer badgers recognize those who help build a robust OSS environment, with impactful technology and a collaborative, engaged community. OpenSourcers build, maintain, and make meaningful contributions to open source projects, while inspiring others to be part of the OSS movement.

Community Hero badgers are given out for contributing materially by organising meetups or conferences or by sharing content and being an active member of the community.

Mentor badgers are awarded to individuals who routinely share their knowledge and empower the more junior members of the community, guiding and coaching them to acquire more hands-on skills. Mentoring is critical to career development and for building skills and achieving long-term career goals.

Maker – Recipients of the Maker badger are recognized as innovators who make meaningful contributions to the community. This badge is given to those who embody the maker spirit of creativity, curiosity, and determination to create projects for societal improvement that help and inspire others.

Builder badgers are given to those who complete specific challenges or for hands-on work with Azure at bootcamps, hackathons and workshops. Collect as many as you can!

Kudos Badgers are given to those who demonstrate great community spirit, teamwork, passion and more. Collect as many as you can!

Learner Badgers are given to those in pursuit of learning and who seek out ways to increase their technical knowledge! This badge is given to anyone attending Azure technical sessions, seminars, meetups and conferences. Collect as many as you can and be sure to visit MS learn to continue your learning journey!

More details on the Azure Heroes initiative can be found at the following link Azure Heroes (microsoft.com)

Thanks for the support and don’t forget to subscribe if you wish to be notified of new posts published on this blog 🙂

How to create a DNS Zone in Azure DNS

Reading Time: 2 minutes

A DNS zone is used to host the DNS records for a particular domain. For example, the domain ‘ccloudbuild.co.uk’ may contain a number of DNS records such as ‘mail.cloudbuild.co.uk’ (for a mail server) and ‘www.cloudbuild.co.uk’ (for a web site).

Azure DNS allows you to host your DNS zone and manage your DNS records, and provides name servers that will respond to DNS queries from end users with the DNS records that you create.

  1. Login to the Azure Portal
  2. Search DNS Zones and click

3. Select your subscription.

4. Create a new resource group or select an existing one.

5. Within the name field, input your domain name, for example cloudbuild.co.uk

6. Select your resource group location

7. Click Review + create, and click create when validation passes

  1. Click Go to resources or search DNS Zones via the search box
  2. You’ll find that a number of records have been created. You will require the 4 X NS records when updating your name server records at your domain registrar.
  3. Next, we move onto creating the required records to support your domain, starting with an A record.

The A in A record stands for Address. A Records are the simplest type of DNS records, and one of the primary records used in DNS servers. The A record contains the pairing between the IP address and the domain name. We will configured an A record to link the domain to a web server.

  1. Click + Record set
  1. Type www in the name field
  2. A – Alias record to IPv4 address should be selected by default. Select AAAA if you’re using IPv6.
  3. Configure alias record set to no
  4. TTL (Time to Live) which specifies how long the DNS servers cache the resolution before it’s removed. For the purpose of this demo, I’ll go with 30 minutes
  5. Finally, in the IP address field input the public IP address.
  6. Click OK

And that’s how you delegate a domain from the domain registrar to Azure DNS, and configure an A record to link the domain to a web server.

Part 4: Terraform with Azure – How to install Azure Terraform Plugin in Visual Studio Code

Reading Time: 2 minutes

My journey preparing to get started with learning Terraform to allow me to deploy workloads into Microsoft Azure continues. If you missed the previous posts, please visit the links below.

Part 1: Terraform with Azure – How to install Terraform
Part 2: Terraform with Azure – How to install Azure cli
Part 3: Terraform with Azure – How to Install Visual Studio Code

In this blog post I will go through the process of installing the Azure Terraform plugin within Visual Studio Code.

The VSCode Azure Terraform extension is designed to increase developer productivity authoring, testing and using Terraform with Azure. The extension provides terraform command support, resource graph visualization and CloudShell integration inside VSCode. For more information visit the following link, Azure Terraform Extension

  1. Launch Visual Studio Code
  2. Click the extensions icon as shown in the screenshot below

3. Type Terraform in the search box and take a look at the various plugins available.

For now, I’ll only be installing extensions Azure Terraform and Syntax highlighting and autocompleting . You can also use keys Ctrl Shift and X to access the extensions area within Visual Studio Code

4. Allow the installs to complete

5. To verify the installations, type @installed in the search box as shown below.

Incase you’re wondering why the Azure Account extension was installed. When installing the Azure Terraform extension, Visual Studio Code will automatically install the Azure Account extension. Azure Account is a dependency file for the Azure Terraform extension, which it uses to perform Azure subscription authentications and Azure related code extensions.

Stay tuned for part 5 where I will go through the process of installing Git on my Windows device and enable in Visual Studio Code. I will also be setting up a GitHub account.

Git vs GitHub

– Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git will allow you create a local repository on your device and manage versions of your files. It runs locally but if required you could clone your local version to the GitHub repository. More info at Git

– GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. More info at GitHub

Part 3: Terraform with Azure – How to Install Visual Studio Code

Reading Time: 2 minutes

My journey preparing to get started with learning Terraform to allow me to deploy workloads into Microsoft Azure continues. If you missed the previous posts, please visit the links below.

Part 1: Terraform with Azure – How to install Terraform
Part 2: Terraform with Azure – How to install Azure cli

Moving to Part 3, in this post I will go through the process of installing Visual Studio Code. Let’s get started.

What is Visual Studio Code?
Visual Studio Code combines the simplicity of a source code editor with powerful developer tooling, like IntelliSense code completion and debugging. First and foremost, it is an editor that gets out of your way. The delightfully frictionless edit-build-debug cycle means less time fiddling with your environment, and more time executing on your ideas. For more information on Visual Studio Code click the following link Microsoft.

  1. Visit https://code.visualstudio.com/download
  2. I’ll be downloading the Windows version (System Installer 64-bit) as shown below. The download was approx 70MB in size at the time of writing this post.

3. Run the installation

4. Accept the agreement when ready to do so and click next

5. Click next

6. Click next

7. I select ‘Create a desktop icon’ and click next

8. Click Install

9. Click finish

In part 4, I go through the process of installing the Azure Terraform plugin within Visual Studio Code, click the following link to continue on my journey, Part 4: Terraform with Azure – How to install Azure Terraform Plugin in Visual Code