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:
- Getting Azure Subscription, Creating App Service Plan and WordPress Web Service using My SQL In App
- Connecting Word Press website with WordPress.com and Installing and configuring Jet Pack
- 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
- Creating Azure Storage Account and configuring WordPress to use Azure Storage to store media files and Optimizing with persistent connection.
- Configuring Custom domain, SSL Certificates.
- Configuring CDN, configuring back up scheduling in azure and Auto Scaling
- How to use REDIS CACHE with WORDPRESS on Azure
- 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:
- Install Application Insights plugin from WordPress Plugins
- Create Application Insights in Azure Portal or through App Service Application Insights
- Get and Configure the Instrumentation Key
- 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
2. 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.
3. 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
4. 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