loading...

Installing WordPress in Azure In 15 Minutes

dfar profile image Dave Farinelli Originally published at dfar.io on ・3 min read

For a client last week, I’ve been working on creating a WordPress instance on the Azure account they have, as a desire to have all things hosted on the Cloud.

This assumes a fresh installation of WordPress, with no existing databases available on your current Azure instance. If you have a MySQL Server already set up in Azure, you’ll change the direction a bit to just use the existing instance.

In general, this makes the most sense if you’re working on a WordPress instance that you expect to get a large amount of traffic, alongside having the ability to scale resources on the fly. If you’re looking to install a WordPress site for a personal blog or other low-traffic site, this isn’t the most optimal way, since you’re generally running ~$35 a month on the cheapest available settings (including no SSL support and only one MySQL server at the lowest settings).

Step 1: Create a WordPress Resource

After logging into the Azure portal, click on ‘Create a resource.’ Search for ‘WordPress and select the image published by WordPress:

You’ll be asked to provide some information, including:

  • App Name : a unique name you would like to use for the app
  • Resource Group : select which resource group you would like to include the WordPress instance in, or allow Azure to create a new one.
  • App Service plan/Location : select the app service plan to use for the WordPress instance. this is what drives the overall cost for all resources running – you can read more here.
  • Database : To use WordPress, Azure needs to create a MySQL server, which Azure provides using the ‘Azure Database for MySQL’ service. Using this, you’ll set the server admin credentials and the pricing tier to be used. This will also create a database name for you for immediate use that you can change to use a more friendly name.

After about 5 minutes, the WordPress instance should be created. You can test it by accessing the URL *https://{your-app-name}.azurewebsites.net. * If you can see the WordPress installation screen, you’re good to go:

Step 2: Complete WordPress Installation

Once the database user has been created, you can run through the standard WordPress installation. With this installation, you’ll notice the wp-config screen is skipped – the file is already generated for you when installing the system.

Although this is the fastest way to get started, there are a few issues that you’ll want to address as you begin development:

  • Setting up a database user that only has access to the newly created database. This way, you only allow the permissions required, and in case credentials for the configuration are ever compromised, you will only have risk for the database compromised and not the entire MySQL server.
  • Securing the Azure Database for MySQL Server to only allow access for particular IP addresses, and adding SSL connection. This installation will by default allow all IP addresses to connect, but it’s more secure to make sure only authorized IP addresses can access the server.

I’ll write more on the above in the upcoming weeks, and how you can work to have a more secure WordPress install.

Posted on by:

dfar profile

Dave Farinelli

@dfar

Senior Software Consultant working at X by 2, LLC - focus in building web applications and interested in DevOps using Angular, .NET, WordPress, Azure, and Jenkins.

Discussion

markdown guide
 

Microsoft Azure now have a Windows Server 2016 image with Wordpress preloaded with MySQL, IIS & phpMyAdmin as an alternative option: azuremarketplace.microsoft.com/en-...

Post configuration guide is on : cloudinfrastructureservices.co.uk/...

 

Awsome info! I have one of these coming up. I've done them before but haven't had to think about pricing. I was going to set up a cookie cutter system to do more sites on azure. After reading this, I won't invest the time and effort. Thank You, you've just saved me money! I appreciate it.

 

Thanks so much for this post. We have a client who is interested in running a fairly large WP site on Windows.

Question: I know WP can run on Windows but HOW WELL does WP run on windows? If they have the option to stick with Linux should they?

I know sometimes just because something can be done does not mean it should be done.

Thanks!

 

Aqui les dejo un video donde instalan wordpress con azure, espero ayude.

youtu.be/5R7KOFSNaB8