Click On Tyler Support


Contact Us

Support Home » VirtualHostX » How To's

How Do I Increase PHP's File Upload Size Limit?

Last Updated December 10, 2019

Editing PHP's maximum file upload size limit is typically done by advanced users who are comfortable using the command line - but it's not too hard that anyone can't learn how!

(We have a guide explaining how to edit files inside the virtual machine here.)

To change PHP upload size limit, you'll need to modify this file inside your virtual machine - not on your Mac's filesystem:

/etc/php/7.2/apache2/php.ini

That is PHP's main configuration file. It contains all of the settings it uses with your websites.

You'll need to find and edit the line in the file that looks like this:

upload_max_filesize = 2M

(On my system, that was line number #827.)

Change the "2M" to be the maximum number of MB you want to allow to be uploaded. For example, if you wanted to allow up to 100MB, you would change the line to read:

upload_max_filesize = 100M

After making your changes, save the file and then click the "checkmark" button in VirtualHostX's toolbar to apply the new settings.