Azure Cloud

How to install Application Insights in WordPress on Azure : Part 8

Are you looking to create your very own Scalable optimized WordPress Site/blog using Azure MySQL, Azure Storage and Azure CDN, then this post series is for you?

I have divided the series into below parts:

  1. Getting Azure Subscription, Creating App Service Plan and WordPress Web Service using My SQL In App
  2. Connecting Word Press website with WordPress.com and Installing and configuring Jet Pack
  3. Creating Azure Database for MySQL and exporting the Data from My SQL In App to Azure Database for MySQL Server, Handling Security and Optimizing with persistent connection
  4. Creating Azure Storage Account and configuring WordPress to use Azure Storage to store media files and Optimizing with persistent connection.
  5. Configuring Custom domain, SSL Certificates.
  6. Configuring CDN, configuring back up scheduling in azure and Auto Scaling
  7. How to use REDIS CACHE with WORDPRESS on Azure
  8. How to install application insights in WordPress on Azure

If you are not following along please check the previous part 1 first.

Application Insights is a good way to measure the performance of the Web site, also provide interactive data on Azure portal. Microsoft have also provided integration with Machine Learning. Application Insights have built in support for Asp.net development all you need to do is install the nugget package and enable it on the App Service and you are good to go.

The question arises how to enable Application Insights when you have WordPress Website on Azure, well this is what we answer today.

In order to configure Application Insights you need to do following:

  1. Install Application Insights plugin from WordPress Plugins
  2. Create Application Insights in Azure Portal or through App Service Application Insights
  3. Get and Configure the Instrumentation Key
  4. Access the website and look for details

  1. Install Application Insights plugin from WordPress Plugins, since I have installed and activated already so it is showing Active, for you it will show Install new.

Figure 1 Search for Application Insights in WordPress plugin

Now go to WordPress | Settings | Application insights; you can see that it requires Instrumentation Key.

Figure 2 Application Insights in WordPress

  1. Create Application Insights in Azure Portal or through App Service Application Insights

Go to Azure Portal, Click on new | search for Application Insights | select Application Insights | fill the form and choose Application Type as General and make sure that your application Insight location match the Location of your Service App and click on create. It may take some time to create it.

Figure 3 Application Insight Creation.

  1. Get and Configure the Instrumentation Key

Now to newly created application insight and in the overview window you will get the Instrumentation Key. Copy the Key and go to WordPress | Settings | Application insights and put the instrumentation key and click save.

Figure 4 Get Instrumentation Key

  1. Access the website and look for details

Now go to Application Insight Overview and see the traffic analytics. You may need to wait for some time to get the initial data.

Figure 5 Health of Application in Application Insights

For more information on Application Insights.

4 thoughts on “How to install Application Insights in WordPress on Azure : Part 8”

  1. I noticed you are not getting any failed requests logged by app insights in the screenshot. Did you manage to get that working?

    1. Yes, my current blog site is not generating any failed request, but I have tried to log failed request with insights by giving the same instrument id in an other application and failed requests did show up in logs.

Leave a Reply