Saturday, May 25, 2013

Max image upload limit in wordpress

I tried hosting a web server on a virtual machine,
Details:
Virtual box
Ubuntu 12.10 server
apache
wordpress

I tried to upload a couple of images from a trip with my family, but there was a file size limit of 2MB on each image.

Solution:


1.find the file php.ini in your php installation:
find / -iname “php.ini” -print 2>/dev/null

(The “-print 2>/dev/null” part makes sure you don’t see error massages in the find output)


I found my files in two places:
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini


2. Edit each file using:
sudo vim php.ini
 

3. And search for the line:

upload_max_filesize = 2M
in vim:
/max_filesize

4. Change it to your preferred limit, save the file.

5. Restart apache with
sudo service apache2 reload 





No comments:

Post a Comment