Skip to main content

How to set PHP.ini value per site – 2MB max file size value

If you have installed some services using PHP where you can upload files (Like Pydio, WordPress, Roundcube, PHPMyAdmin, etc…) you have per default a maximum upload file size of 2 megabytes that could be more than annoying.

This value can be changed directly in your php.ini file but will apply to all PHP services…

If you want to better tweak this per service, like 10MB for Roundcube, 20MB for PHPMyadmin and 1GB for Pydio, I’d suggest you to configure this value directly in the Virtualhost of each of your services on your LAMP server.

You just need to add:

in your virtualhosts (Vhost) after the first <VirtualHost *> and restart/reload apache:

And voila !

Quite easy that way I believe.


2 thoughts on “How to set PHP.ini value per site – 2MB max file size value

    1. Hi Grudo,

      How so? All my websites are using the presented configuration? What are you trying to achieve and how are you doing it?

      May be I can help.

Leave a Reply

Your email address will not be published. Required fields are marked *