Skip to content
adatum
  •  SCOM Web API
  • About adatum
Azure CDN Logo Azure

Azure CDN on WordPress

  • 02/03/201725/11/2019
  • by Martin Ehrnst

Content Delivery Network (CDN) let you distribute static content from your website or other web application from locations closest to the end-user. For a standard web site this include things like images, CSS files, Java script and so on.

 

Looking at the image below, you can see that visitors on this site is scattered around. enabling CDN will therefore improve performance by delivering the content from different locations rather than the site host which is in Europe.
Following this post you should be able to have CDN up and running in about 15 minutes 🙂

 

visitors location

 

 

 

 

PreReq’s

  • W3 Total Cache WordPress Plugin
  • Azure Subscription

 

Enable Azure CDN

The first thing you need to do is to create a new Azure CDN profile in the Azure portal. Search for CDN and create a new profile.

I chose to go with the standard Verizon version which at this point it cost $0.08 per GB up to 10TB usage. If you have other needs please check the features and pricing for Azure CDN here.

Next, create a new endpoint and configure the origin. If you run your site in Azure you can find it in the drop down. The endpoint will be the URL which all cached content is available. You can run multiple endpoints under one profile, i just ended up using a 1-1 resource group, profile and endpoint.

Azure CDN endpoint blade

According to Azure documentation, it can take up to 90 minutes before new endpoints are cached, so expect to see 404 errors after you have created it. Take a note of the endpoint hostname which is the address we are configuring in WordPress.

 

Configure WordPress CDN

Heading over to your wordpress admin page you will have to enable CDN under W3 Total Cache general settings. Tick enable and chose generic mirror as your CDN type. Azure CDN will mirror your data and using “pull” functionality.

Enable CDN using wordpress

 

 

After this is enabled click CDN under performance on your left menu. If you do not remember your endpoint name, go back and copy it from the Azure portal.

 

Scroll down to the configuration area and put in your endpoint name without HTTP(s). Check connectivity by clicking “test mirror”

 

This is all configuration needed to do basic CDN using Azure on your WordPress web site, but a lot of customization can be done both in Azure and in WP. After caching is enabled and time has done it things. You should be able to confirm that mirroring is working. Here is a screenshot of Chrome developer tools where you see the image URL is my CDN endpoint in Azure.

 

Share this:

  • LinkedIn
  • Twitter

Related

Getting your colleagues engaged with SCOM
First look at the vSphere 6.5 REST API
Azure CDN Wordpress

Related articles

microsoft social sign-in
Azure Application registrations, Enterprise Apps,…
gray laptop computer showing html codes in shallow focus photography
Azure Infrastructure As Code video…
flight sky earth space
Recording available: ARM template deployment…
Recording available: Complex ARM templates
Multiple Azure credentials in PowerShell
4 COMMENTS
  • Katie
    10/10/2017 at 17:00
    Reply

    Hello, I settup wordpress on azure. I am not sure how this will work. May I run into some issues with WordPress websites on azure especially with new plugins? It can be a problem that some of them will not work on azure?
    Thank you

    1. Martin Ehrnst
      10/10/2017 at 17:05
      Reply

      Hi Katie. I cannot answer that specifically, but I used several extensions on azure without problems

  • nik
    02/04/2017 at 00:07
    Reply

    hi,
    what if i don’t run website in Azure, what’s the second step?
    thanks

    1. Martin Ehrnst
      03/04/2017 at 10:11
      Reply

      Hi Nik, you should be able to manually enter your hostname / orgin.

Engage by commenting Cancel reply

Top Posts & Pages

  • Azure AD authentication in Azure Functions
  • Creating Azure AD Application using Powershell
  • Multi subscription deployment with DevOps and Azure Lighthouse
  • Script to add SCOM agent management group
  • Resource health through Azure Rest API
  • SCOM Alerts to Microsoft Teams and Mattermost
  • Azure Lighthouse why is it so important
  • Schedule maintenance mode for group (easy)
  • Azure Application registrations, Enterprise Apps, and managed identities
  • Remediate Azure Policy with PowerShell

Tags

agent announcements api ARM authoring Automation Azure AzureAD AzureFunctions AzureLighthouse AzureMonitor AzureSpringClean Bicep Community CSP database EventGrid ExpertsLive ExpertsLiveEU IaC Infrastructure as code Integrations LogAnalytics management pack monitoring MSIgnite MSIgnite2017 MSOMS MSP nicconf Nordic Virtual Summit OperationsManager OpsMgr Powershell QUickPublish rest SCDPM SCOM SCOM2016 SCVMM Serverless SquaredUP SysCtr system center Webasto

Follow Martin Ehrnst

  • Twitter
  • LinkedIn

RSS Feed RSS - Posts

RSS Feed RSS - Comments

Microsoft Azure MVP

Martin Ehrnst Microsoft Azure MVP

NiCE Active 365 Monitor for Azure

NiCE active 365 monitor for Azure
Adatum.no use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Cookie Policy
Theme by Colorlib Powered by WordPress