Quick Tip: Increase Maximum Upload Size In WordPress
When uploading images through WordPress the max file size is 2MB, which means when trying to upload anything bigger the user simply gets denied by the application. This can be quite annoying especially when taking image quality into consideration. The higher the image quality, and bigger the image, the larger the overall file size.
Some blogs, that specialize in photography for example, would benefit from a much larger file size limit. However to increase the file size we need to edit important WordPress source files which could potentially harm the application (if the user is not careful), so it’s a good idea to backup the entire WordPress database before continuing just in case.
To continue, we also need proper access to the WordPress install directory, which means we need access to account hosting options. Sadly if you are not the blog owner, you cannot take advantage of this tweak; but if you need the maximum file size increased you could direct your blog owner in the right direction and have them check out this article!
Increase Image Upload Size
In the root WordPress folder is a file called “PHP.ini” which handles standard PHP functions for the WordPress application; this is also the file we need to alter.
Open the file and look for the following line of code:
upload_max_filesize = 2MB |
To increase the maximum image file size that can be uploaded we simply need to change the “2MB” in the code above to the desired file size. For instance lets say we would like to increase the maximum supported image size to “32MB” we would simply change the code so it looks like the following:
upload_max_filesize = 32MB |
Note: In some cases there may not be a “PHP.ini” file in the main directory of the WordPress install. If that is the case, you need to create the file and copy it to the “wp-admin” directory. WordPress will then automatically move the new .ini file to the proper directory.
After creating a new text file called “PHP.ini” you need to include the following code in the new file:
memory_limit = 32M upload_max_filesize = 100M post_max_size = 100M |
No matter the method you use to increase the file size make sure to save the altered “PHP.ini” file and upload it to the proper WordPress directory.
After your finished, you should be all set. Check with WordPress to see your new supported file size!


Showing 9 Comments
Pothi
Great tip. Unfortunately, I’m on the shared host. So, here is the tip that does the same trick via .htaccess file.
php_value upload_max_filesize 32M
One may replace upload_max_filesize with other keywords as in php.ini file.
REPLY 770 days agoCalÃÂÂtoe.:. (Cristina MJ)
Lately, WordPress allows up to 8MB by default, but great tip anyway. Thanks. =)
REPLY 770 days agoMike
Great tips, but if it’s my case, I wouldn’t upload any pictures to WordPress because the more and more pictures you upload to your blog, the worse your blog performance will be later. So, instead of uploading to blog, I upload to a S3. I have heard about using CDN like MaxCDN but I still don’t know how. Do you know about this?
REPLY 768 days agoeldar
great tip! thanks
REPLY 744 days agoeliasv
Hello,
1. I did change the following in php.ini:
memory_limit = 32M
upload_max_filesize = 8M
post_max_size = 8M
2. restarted the apache
3. checked that these values are valid, through phpinfo() command
BUT I still see the MAximum uploaded file size: 2MB
Can you please help?
Kind Regards
REPLY 691 days agoAdri @ Amazing Pictures Online
Hello Briley,
I always use WordPress for my two blogs and let me tell you, this has always been an issue for me. I’ll use WP Cache sometimes but this will conflict, leaving me with no solution.
I’m so glad I came here because these tips have really helped me. Thanks!
REPLY 638 days agoDavid
fantastic, thanks for info
REPLY 619 days agoPuiu
works like a charm. Thanks!
REPLY 618 days agoHarry Styles
Worked like a dream – thanks a million
REPLY 601 days ago