App Service PHP8.0 Wordpress PHP configuration?

CheeseAndOnionScone 96 Reputation points

With the update to PHP8.0, it has not changed to NGINX

How do we modify the php file so that we can increase the file upload limit please for wordpress?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,533 questions
0 comments No comments
{count} votes

Accepted answer
  1. CheeseAndOnionScone 96 Reputation points


    I managed to figure it out in case anyone else needs. If you put a .user.ini into the root, it will pick it up

    Can we please update the documentation here -

    It looks like the move to NGINX is awesome and fast, but none of this was documented that this was happening when you switch PHP versions.

1 additional answer

Sort by: Most helpful
  1. ajkuma 20,861 Reputation points Microsoft Employee

    @CheeseAndOnionScone , Thanks for the great question.

    Yes. Azure App Service on Linux images using PHP 8.x are now bundled with NGINX instead of Apache. The use of .htaccess files will not work for NGINX as these are used for Apache only. You could setup a custom startup script and modify the existing NGINX site configuration.

    Also, since PHP 8 images are defaulted to nginx/php-fpm . So, you will not need .htaccess, but can use rewrite rules to mimic .htaccess.

    Kindly take a look at the sample: URL below for post_max_size=60M and | upload_max_filesize=20M

    Also, checkout the App Service article, for modifying the default site config, and for steps to create the custom startup script and the application settings:
    App Service PHP -8 Rewrite-rule

    Additionally: please checkout these docs:

    You may take a look at this third party blog to know - Convert Apache Rewrite Rules to NGINX Rewrite Rules | NGINX

    You can configure using startup command.
    Azure App Service on Linux FAQ | What-are-the-expected-values-for-the-startup-file-section-when-i-configure-the-runtime-stack-

    Kindly let us know how it goes or you have any further questions.

    0 comments No comments