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!