How to increase the max image upload size in WordPress

There are two variables which restrict the maximum media upload size to wordpress.  There are PHP variables.


Assuming that you are using Ubuntu and Apache then you should create a .ini file in the conf.d directory. Don’t edit the default php.ini file because this is sometimes updated by the package maintainer and there is a chance that any changed you make to might be lost. So create a file called:


I wanted up be able to upload 30 megabyte files and so put:

upload_max_filesize = 30M
post_max_size = 30M

Then restart Apache:

apache2ctl restart

I hope this helps someone.

Leave a Reply