Increase PHP’s File Upload Limit Using php.ini

We all run into this on a daily basis. That’s why I had to add this one for sure.

 

First things first, let’s open up a terminal and edit your php.ini file.

I normally gedit for my personal preference.  This is assuming you have a GUI of some sort. Such as:  Gnome, Xubuntu, Kubuntu, blah blah.  In the case you don’t have a GUI obviously you are going to have to use Gedit or VIM or something like that.

moving on.

type this into your terminal


sudo gedit /etc/php5/apache2/php.ini

Once it’s opened find the line that says   upload_max_filesize

 

file_uploads = On
upload_max_filesize = 10M

Eureka!!  Now you can change it to what you like

 

Side Note:  For those of you using forms to upload your files.  You might want to read this as well.  By default the php.ini files restrict post uploads to 8 meg.  Find the line that says

post_max_size = 8M

Change that to whatever you wish.  I hope this helps.  Feel free to ask questions below if you have trouble.

 

 

 

Leave a Reply