Table of Contents
IntroductionIn recent times, Microsoft has introduced an easy-to-use solution for WordPress users known as the “Azure WordPress App Service.” This service, which has recently become generally available, allows users to set up a WordPress website on Azure quickly and conveniently. The process involves creating a flexible Azure MySQL database, automatically linked to the WordPress app service. In this article, we will explore the step-by-step process of deploying a WordPress site using Azure WordPress App Service and the benefits it offers to both beginners and seasoned website administrators.
Step 1: Accessing the Azure Portal
- Open your preferred web browser and navigate to portal.azure.com.
- In the search bar, type “WordPress” and click on the “WordPress on App Service“ option listed under the marketplace.
- This will lead you to the Azure WordPress App Service page.
Step 2: Creating a Resource Group
- Once on the Azure WordPress App Service page, either select an existing resource group or create a new one.
- Choose a region that is geographically close to your target audience to optimize website performance for your visitors.
Step 3: Setting Up the App Service
- Give your WordPress app service a unique URL prefix, such as yourwebsite.azurewebsites.net.
- Select an appropriate hosting plan; the “Basic” plan should be sufficient, but if you prioritize faster site performance, opt for the “Standard” plan.
Step 4: Configuring WordPressProvide the necessary information to set up your WordPress site:
- Site language: Select the desired site language.
- Admin email: Set the administrator email address for your WordPress setup.
- Admin username: Set the username for the WordPress administrator.
- Admin & Confirm password: Set and confirm the password to be used for the WordPress administrator.
Step 5: Adding Microsoft CDN or Replicating with Blob Storage
- To enhance the delivery of your content, it is advisable to utilize Microsoft CDN or Blob Storage region replication. If you opt for Azure AFD, you will need to choose an existing AFD profile or create a new one. For this example, we will select Azure CDN.
- Note that if you opt to use Azure CDN, Azure Blob Storage, or Azure Front Door, you need to consider the additional costs associated with these services. Please check the Azure CDN pricing, Azure Blob Storage pricing, and Azure Front Door pricing pages.
- Enable Virtual Network for your WordPress app and Storage account private networking, These options allow content to be served closer to your website users, enhancing the overall user experience.
- To improve your website’s performance and user experience, consider using Azure Blob Storage.When selecting your Virtual Network, you have the option to either create a new VNet with Azure App Service or choose an existing one, as illustrated in the figure below.
Step 6: Review and Create
- Review your selections and configuration details to ensure they align with your requirements.
- Click on the “Tags” button to categorize your deployment.
- After reviewing, click “Review and Create.”
Step 7: Deploying the WordPress Site
- Once you are satisfied with your configuration, click on the “Create” button to initiate the deployment process.
- The deployment may take a few minutes to complete.
- You will notice several Azure resources created, which were set up and customized to support your new WordPress site. These resources include a MySQL database for WordPress’s flexible server backend, an App Service plan, an App Service resource for hosting the web application, and an Azure Virtual Network for private access to the App Service and the MySQL database, along with a few other resources to ensure everything is set up correctly.
Step 8: Validate the WordPress Site Functionality
- Upon successful deployment, Navigate to the created Web App resource that will display the default domain name and other configuration options for the WordPress site.
- The default domain name allows access to the WordPress site without requiring any custom domain configuration, which can be set up later if necessary.
- Click on your newly created WordPress site’s URL.
- Here, you will see WordPress installed and a temporary home page (Hello world!)
Step 9: Customizing the WordPress Site
- After a short wait, the WordPress installation will be completed, and you will be presented with your fully functional WordPress site.
- Azure provides a custom theme, which you can later replace with a theme of your choice.
Step 10: Accessing the WordPress Admin Dashboard
- To access the WordPress admin dashboard, go to yourwebsite.azurewebsites.net/wp-admin.
- Use the admin username and password that you provided during the initial setup.
- The admin dashboard enables you to customize your site, install and manage plugins, and update your WordPress site effortlessly.
Step 11: Updating WordPress
- Updating WordPress is a seamless process.
- Click on the “Please update now” link and then select the “Update to version 6.0.1” button.
- Azure WordPress App Service will handle the update procedure for you.
- By default, the WordPress on Azure App Service team has included the following three WordPress plugins for you:
- W3 Total Cache: We use this plugin for Redis cache and to enable integration with Azure CDN and Blob storage.
- Smush: We use this plugin for image compression.
- Akismet: This plugin helps in protecting your website from malicious content.
- W3 Total Cache CDN setting will be configured automatically and an Azure Storage account will be attached to host the Website object.
Step 12: Accessing phpMyAdmin for Database Management
- Azure WordPress App Service allows you to access phpMyAdmin, the MySQL administrator portal, directly from your app service URL.
- Simply append “/phpmyadmin” to the URL and use the MySQL admin username and password to log in.
- This will enable you to manage and modify your WordPress database as needed.
Step 13: Configure Custom Domain on WordPress SiteWhile you could host your website with the default domain name and the subdomain .azurewebsites.net of the Azure App Service. However, it’s recommended to purchase a domain name from your favorite domain registrars such as GoDaddy or Cloudflare to host your WordPress site instead. If you don’t have a custom domain yet, you can purchase an App Service domain directly from Azure. To configure a custom domain for your WordPress site on Azure, follow these steps:
- Navigate to the Custom Domains pane under Settings of the App Service resource created for your WordPress web app.
- Select ‘Add custom domain’ to configure your own custom domain for the WordPress site.
- To configure a custom domain for your WordPress site on Azure, follow these steps On the “Add a custom domain” page:
- Set the Domain provider to “All other domain services.”
- Choose “App Service Managed Certificate” for TLS/SSL certificate.
- Select “SNI SSL” as the TLS/SSL type (recommended for free and supported by most modern browsers).
- Specify your fully qualified domain name (e.g., wpapp.3tallah.com) based on the domain you own.
- Don’t validate yet. The Domain validation section will show you two DNS records that
- You must add with your domain provider.
- Sign in to your domain registrar’s website and find the page for managing DNS records.
- Create two DNS records (CNAME or TXT) based on the information provided in the Domain validation section in the Azure portal (Host and Value columns).
- Once you’ve added the DNS records on your domain provider’s side, go back to the Azure portal’s “Add Custom domain” page and select “Validate.”
- Check the Domain validation section to ensure that both domain records show green check marks under the Status column, indicating successful configuration.
- If any red X appears, fix the errors in the DNS record settings on your domain registrar’s side.
- After successful validation, click “Add” to add the custom domain to the list.
- Wait for a few minutes to let App Service create the managed certificate for your custom domain. Once complete, the red X will become a green check mark, indicating a secured connection.
- SSL Binding will be initiated automatically and your custom domain certificate will be configured
- Finally, browse to your WordPress custom domain to access your site.
Step 14: Managing Docker Image Hosting
- Your WordPress site’s images are hosted as a Docker image in a private Azure Docker registry.
- You can manage these images conveniently through the app service’s application settings.
WordPress Features on Azure App ServiceIn addition to the Azure services mentioned earlier, the WordPress on Azure App Service team at Microsoft has implemented the following features to enhance the WordPress hosting experience:
- Updated Technology Stack:
- Automatic updates for Linux, PHP, and Nginx are provided to keep the technology stack up-to-date.
- New WordPress versions are made available for new deployments within two weeks of release.
- For existing deployments, you will need to manually upgrade your WordPress version.
- Out-of-the-box Redis Cache Implementation:
- The offering includes an out-of-the-box implementation of Redis Cache in the Web Server, which improves performance and reduces the load on the database.
- Basic (B1):
- WebApp Server: 1 vCore, 1.75 GB RAM, 10 GB Storage.
- MySQL Flexible Database Server: 1 vCore, 2 GiB RAM, 32 GiB storage, 400 IOPS.
- Standard (P1V2):
- WebApp Server: 1 vCore, 3.5 GB RAM, 250 GB Storage.
- MySQL Flexible Database Server: 2 vCores, 8 GiB RAM, 128 GiB storage, 700 IOPS.
- Premium (P1V3):
- WebApp Server: 2 vCores, 8 GB RAM, 250 GB Storage.
- MySQL Flexible Database Server: 2 vCores, 16 GiB RAM, 256 GiB storage, 1100 IOPS.