How to Change the Upload File Size in PHP
The PHP programming language contains configuration parameters that define how much information can be uploaded to the server in a single transaction. Upload size limits must be expanded for sites that host video content, file storage or large images. You can change the upload size limit in the PHP.ini configuration file.
Instructions
-
-
1
Open the "Start" menu and type "notepad.exe" in the Search bar. Right-click "Notepad.exe," select "Run as Administrator" and enter your administrative password if prompted.
-
2
Click "File," then "Open."
-
-
3
Type the path to your PHP.ini file. This is "%SystemRoot%\PHP.ini" by default, but the file may also be stored in your PHP installation folder.
-
4
Press "Ctrl" and "F" on your keyboard to open a "Find" window. Type "upload_max_filesize" without quotation marks and press "Enter" to locate the max file size parameter of the PHP configuration.
-
5
Change the value of the "upload_max_filesize" to the new maximum upload size you would like your system to accept in megabytes. The default value is 2MB. This can be adjusted to another value, such as 50MB, to allow up to 50MB in a single upload.
-
6
Click "File," then "Save" to save your updated PHP.ini file.
-
7
Restart your Web server to load the new configuration profile.
-
1
Tips & Warnings
Setting the maximum file size to too high of a value will allow users to quickly fill your system's hard drive with uploads.