Blog Post

Apps on Azure Blog
3 MIN READ

Transition from Alpine Linux to Debian for WordPress on App Service

abhishekreddy's avatar
abhishekreddy
Icon for Microsoft rankMicrosoft
Oct 08, 2024

We are excited to share with you that we will be transitioning from Alpine to Debian as the default Linux distribution for WordPress on App Service. While Alpine has served us well with its lightweight and performant nature, our evolving needs require a more feature-rich environment. Debian is the ideal candidate to support our next phase of development and growth. This transition will also align us with App Service Linux, which already utilizes Debian as the default Linux distribution.


For those who might not be familiar, Linux distributions, or Linux distros, are complete operating system packages that include the Linux kernel and a set of pre-installed programs. There are hundreds of distros available; some are commercial, while others are community-developed. Alpine Linux and Debian are examples of community-developed distros. The main difference between these two is that Alpine is a small, minimalistic distro ideal for starting projects, whereas Debian comes with extensive functionality and packages, making it suitable for development, testing, and production environments.


Key Points to Note:
1. New Deployments: Starting October 7, 2024, all new WordPress sites will be deployed on Debian.
2. Existing Sites: For sites created on or before October 7, 2024, you will need to follow a few steps to upgrade from Alpine to Debian.
3. Support Timeline: WordPress sites on the Alpine stack will be supported until December 31, 2024. Please ensure your websites are upgraded by this date.


Benefits of Transitioning to Debian:
Switching to Debian will enhance your site's performance and security. By aligning with App Service Linux, you will benefit directly from platform improvements rolled out by App Service Linux. You will receive stack upgrades sooner and more frequently. Additionally, as all future development will be focused on the Debian platform, you will continue to receive all product upgrades if you are on Debian. It is important to note that support for Alpine will end on December 31, 2024. Failure to transition to Debian by this date will result in missing out on new features, improvements, crucial security patches, and support.

 

How to upgrade from Alpine to Debian?

 

Prerequisites:
1. Ensure you have taken a backup of your App Service. You can follow the instructions here: https://learn.microsoft.com/azure/app-service/manage-backup
2. Startup Scripts: Verify that your startup scripts are functioning correctly. You may need to modify them to ensure compatibility with Debian. You can find more details here: Using custom startup commands with Web App for Containers

 

Upgrade Steps:
1. Navigate to the App Service page for your WordPress site in the Azure portal.

 

2. Access the Configuration blade.


3. In the General settings tab, locate the Stack settings section.
• If you are using Alpine – PHP 8.3, select ‘PHP 8.3’ as the Minor version.
• If you are using Alpine – PHP 8.2, select ‘PHP 8.2’ as the Minor version.
• For versions preceding Alpine – PHP 8.2, it’s advisable to first upgrade to Alpine – PHP 8.3, and then proceed to select ‘PHP 8.3’. This step-by-step approach ensures a smooth transition, first updating the PHP version followed by the switch from Alpine to Debian. However, if you prefer to perform both upgrades simultaneously, that option is available as well.


4. Next, select ‘Save’ to save the changes and initiate a restart of your App Service. The App Service will be updated in the background. You can check it in the App Service overview page.

 


Post-Upgrade:
We have thoroughly tested the Debian images, and it is highly unlikely that this upgrade will result in unexpected issues. However, to ensure a smooth transition, we recommend testing your website before going live.
Functionality Testing: Test the functionality of your website. If you encounter any issues, you can debug or roll back changes using the App Service configuration blade. Additionally, you can restore your site to a previous snapshot using your App Service backup.

 

Support and Feedback

We’re here to help! If you need any assistance, feel free to open a support request through the Microsoft Azure portal. New support request - Microsoft Azure

 

For more details about our offering, check out the announcement on the General Availability of WordPress on Azure App Service in the Microsoft Tech Community. Announcing the General Availability of WordPress on Azure App Service - Microsoft Tech Community.

 

We value your feedback and ideas on how we can improve WordPress on Azure App Service. Share your thoughts and suggestions on our Community page Post idea · Community (azure.com) or report any issues on our GitHub repository Issues · Azure/wordpress-linux-appservice (github.com).

 

Alternatively, you can start a conversation with us by emailing wordpressonazure@microsoft.com.

Updated Dec 10, 2024
Version 4.0
  • mpetz1495's avatar
    mpetz1495
    Copper Contributor

    Hi there, 
    nice to see this one evolving further. Although hosting Wordpress on Azure is quite expensive compared to standard Webhosting (especially in regards to FrontDoor/CDN aspects); availability and scalability are still among the best options out there. 


    I am currently playing around with it and doing some test migrations, everything looks really nice and neat so far.
    Two things that I have run across, which could be optimized:


    Using W3TC for storage integration - this stores uploads on Azure Blob Storage and makes them publicly available, which is not optimal for every scenario. If I want WordPress to be able to fully control access, I either need to use Azure Files (crazy expensive for large content like video) but it would allow native read/write access and therefor should work with each and every Wordpress plugin. Or have a part of /wp-content/uploads linked as read-only Azure Storage and manage its content manually by moving files in/out of Azure Storage and manually adjusting database links.

    I am running into some font-loading issues with one of my favorite plugins, not sure yet if that one is a CORS issue or maybe a mime type one - and a default caching of 365 days on standard setup OOBE makes troubleshooting that a nightmare. A good 'troubleshooting' guidance would be nice - where to enable which logs, which log contains which service's errors, some common issues etc.

    When I got my font issue resolved, I will start moving some small projects over 🙂

    Well done and thanks again for the great job

  • SamRueby's avatar
    SamRueby
    Brass Contributor

    Thank you for this post.

     

    I think a link was missed here:

    You can find more details here: Using custom startup commands with Web App for Containers

    As you know, the startup script for the Alpine image ignores the 'Startup Command' configuration in the Azure Portal and simply executes the script found at /home/dev/startup.sh. Does the Debian image work the same, or us 'Startup Command' used from the Azure portal now?

  • Hello mpetz1495 ,

    Thank you for your comment! It's encouraging for us. We prioritize performance and security and continuously work on optimizing costs. We appreciate your suggestions regarding storage integration and logging and will definitely look into them.

  • mpetz1495's avatar
    mpetz1495
    Copper Contributor

    SamRueby awesome, I tried multiple times to use the startup command to manipulate the container and it never worked like on the Azure Container Instances - thanks for the info

    I am still running into a font loading issue as soon as I install the BuddyBoss theme (which is working on all systems I used before without any issue), so I expect an issue in the underlying default configuration of either nginx or php-fpm. Tried to debug, spot and fix it with MIME types, extensions and NGINX content security policy via SSH - but was unable to get it working so far. There's a lot of javascript used in that theme, but the CSS files and the fonts itself are hosted locally - so it is no CORS issue. I already opened a ticket with their support, and they were suspecting a CSS issue, but the CSS files itself are loading according to browser developer tools. As I am on a Visual Studio subscription here right now, I cannot open a ticket to Microsoft directly. In case someone who is more skilled would like to take a look at it with dev tools in the browser: https://blackrhinoteam.azurewebsites.net/wp-login.php should show icons based out of fonts from a CSS on the left inside the Email Address and the Password field. Any pointers to what could be the issue are welcome.

  • SamRueby's avatar
    SamRueby
    Brass Contributor

    mpetz1495  It's failing because there's no reference to the font bb-icons. It's not even attempted to be loaded (as-opposed to trying and failing).

  • mpetz1495's avatar
    mpetz1495
    Copper Contributor

    SamRueby That would mean that the issue is at least one level below with the CSS system - but why is it working on Apache and Caddy then without a problem? I cannot believe that this is a generic nginx-incompatibility.
    I did a site migration of the site first and had that same issue with WPiA, so I retried with installing from scratch which lead to the same result. It is exactly the same theme on the same version. And I also got this issue with the BuddyBoss plugin and all icons showing up there on front end and back end (so it is not a pure theme issue and has for sure nothing to do with theme or plugin itself) - I have got that issue only when running Wordpress in Azure, again: also the plugin is working on Apache and Caddy for me without any issue. Besides a warning about a non-matching return type, which is could be suppressed with an attribute, the php-fpm.www.log does not contain anything, which matches my assumption that this problem is not php-interpreter related itself (Apache and Caddy were running with PHP 8.3 before, too).

    Is there anything special on the WPiA security configuration that could prevent that? Maybe in NGINX?

    • mpetz1495's avatar
      mpetz1495
      Copper Contributor

      Just to get you updated on the issue reported around mid October. I had a ticket opened with the theme developers, but in the end my brother took a look after mid-November and fixed a flaw in their CSS display code to make it work, which somehow was either nginx- or WPiA-nginx-conf-related for becoming visible. It is still strange that I did not observe this when running on Apache or Caddy2. The issue was solved without touching the WPiA config at all! It is running really well now in Azure, especially since I went for a full W3 Total Cache license, put in Azure Cache for REDIS for everything and set up the auto-scaling. Spot-landing for WPiA on that one - yes, it is pricey, but availability, survivability and scalability are absolutely awesome.

  • Brian Bagley's avatar
    Brian Bagley
    Copper Contributor

    I am seeing something different at step 2/3.  I don't see any of the detail under Stack settings you show above. 

     

    • SamRueby's avatar
      SamRueby
      Brass Contributor

      Doesn't appear to be detected as the WordPress container image. What does your Deployment Center show?