Blog Post

Apps on Azure Blog
2 MIN READ

How to set up a new WordPress website on Azure App Service

abhishekreddy's avatar
abhishekreddy
Icon for Microsoft rankMicrosoft
Jan 31, 2023

WordPress on Azure App Service combines the power of WordPress and Azure App Service to bring you a fully managed, scalable, and performant WordPress hosting solution. In this article, we will learn how to create a new WordPress website on Azure App Service, step by step.

 

If you like to learn through videos, here is a video by our WordPress on Azure App Service expert guiding you through the steps of creating a WordPress website on Azure App Service.

 

 

Here are the steps shown in the video:

 

Step 1: Go to Create WordPress on App Service - Microsoft Azure.

 

Step 2: In the Basics tab, under Project Details, select the correct subscription and click on Create new to create a new Resource group. Give a name to identify your resource group and click on OK.

 

Step 3: Under Hosting Details, select a region you wish to serve your application from. Give a unique name to your app. If the name is not unique, you will see an error message: The app name <website_name> is not available.

 

Step 4: Under Hosting Plans, the Standard hosting plan is selected by default. Should you need to change the plan, click on Change Plan. Choose your desired plan from the plan picker side bar.

 

 

Step 5: Under WordPress setup, select the site language, provide an admin email address, username, and password for the WordPress website.

 

Step 6: You can directly click on Review + create and go to the Review + Create tab or you can click on Next: Advanced >.

 

Step 7: In the Advanced tab, you can opt for advanced features: Azure CDN or Azure AFD, and Azure Blob Storage. We recommend that you select Azure CDN and Azure Blob storage. If you select Azure AFD, you will need to either select an existing AFD profile or create a new one.

 

Step 8: Click on Review + create.

 

Step 9: On the Review + create tab, you can see all the details of the web application. Click on Create.

 

 

Step 10: Wait for the deployment to finish. Then click on Go to resource.

 

Step 11: In the App Service Window, find the URL and go to the website.

 

Step 12: You will land on the homepage of your WordPress website.

 

Step 13: Add /wp-admin to your URL. In this example, https://wpwebsitename.azurewebsites.net/wp-admin This will take you to the Admin page.

In the Admin page, enter your credentials that you had set in Step 5.

 

Step 14: You are now in the WordPress Admin Dashboard! Happy WordPress-ing!

 

Support and Feedback

In case you need any support, you can open a support request at New support request - Microsoft Azure.

For more details about the offering, please visit Announcing the General Availability of WordPress on Azure App Service - Microsoft Tech Community.

If you have any ideas about how we can make WordPress on Azure App Service better, please post your ideas at Post idea · Community (azure.com)

or you could email us at wordpressonazure@microsoft.com to start a conversation.

Updated Jan 31, 2023
Version 2.0
  • nguasongjohn, there are two steps you need to follow:

    1. Configure the custom domain in your AFD profile. Learn more here: Add a custom domain to Azure Front Door | Microsoft Learn
      1. Make sure that you have not configured the custom domain in the App Service
    2. Add this application setting in your App Service: CUSTOM_DOMAIN and set the value to your custom domain. More details here: wordpress-linux-appservice/WordPress/wordpress_afd_configuration.md at main · Azure/wordpress-linux-appservice (github.com)
  • nguasongjohn's avatar
    nguasongjohn
    Copper Contributor

    My company wants to migrate our website hosted on WordPress to WordPress on App Service. I have deployed my WordPress on App Service behind Azure front door. I can access the WordPress site by putting my custom domain in url but I have two main issues accessing the WordPress admin portal:

    1. To go to wordPress Admin portal, adding /wp-admin to URL does not work. It redirects me to the Azure app service default site which is forbidden.  But adding only  /admin in the URL takes me to admin portal.

     

    2. The  URL for the WordPress admin portal is showing the azure front endpoint instead of my custom domain on the Azure front door

    https://pressword-8871aec190-ekbbbnbsgsh0eecg.z02.azurefd.net/wp-login.php?redirect_to=https%3A%2F%2Fpressword-8871aec190-ekbbbnbsgsh0eecg.z02.azurefd.net%2Fwp-admin%2F&reauth=1

    My question is

    How can I configure Azure Front Door to show my custom domain name in the admin portal URL?

     

     

     

     

  • PB360it appears that you require assistance from a web developer to enhance your existing WordPress pages or to create new ones.

     

    For this purpose, providing the developer with your WordPress credentials should suffice. Additionally, to limit their access, you can assign the developer an editor role on your WordPress site. For more details on roles and capabilities, please refer to the WordPress.org documentation. Roles and Capabilities – Documentation – WordPress.org

     

    If you need further information, feel free to contact us at wordpressonazure@microsoft.com.

  • PB360's avatar
    PB360
    Copper Contributor

    Hello,


    we are hiring a web developer to improve some of the pages on our WordPress running on Azure Web services. What type of permission do I need to give him to fix stuff, upload new pages, etc. without opening us any other area on our Azure infra.

    A prompt response would be highly recommended.

  • joetahsin's avatar
    joetahsin
    Copper Contributor

    Hi again, 

     

    i have already found the solution, using the advanced tools on the app service and then using bash.

    make a copy of the wp-config.php, then update the wp-config.php with the following:

    remove these 2 lines:

     
    //Relative URLs for swapping across app service deployment slots
    define('WP_HOME', $http_protocol . $_SERVER['HTTP_HOST']);
    define('WP_SITEURL', $http_protocol . $_SERVER['HTTP_HOST']);
    define('WP_CONTENT_URL', '/wp-content');
    define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
     

    then you will be able to change it from the wp-admin portal.

     

  • joetahsin's avatar
    joetahsin
    Copper Contributor

    Great blog !

    Im actually going to use it for one of my customers.

    I got a small question, how can i make this wordpress site fully https with a custom domain behind an Application Gateway ?

    I am already able to make it available through Application gateway, but if i want to open a post page then its still pointing to *.azurewebsites.net.

     

    I have searched on the net, should be able to change the site url , but it is grayed out .

     

    have tried to follow this >> How-to For WordPress on App Service (WindowsLinux ) - Azure App Service 

     

     

    any tips on that ?