This code snippet explains how to increase the maximum limit you can upload files to WordPress.
Sometimes managing a blog or website you might find that the default maximum limit of 8mb is not enough for you to be able to upload all your files. That is not a problem. There are a few simple workarounds. WordPress has an 8mb limit so trying to upload any file or image greater than this size will result in the file failing to upload.
Any easy way to confirm what your WordPress maximum image upload size is, is to read the dialog box when you upload an image. View the below image for an example.
You have a couple of options to increase the WordPress maximum upload size.
Increase Upload Size by Modifying php.ini File
Most shared hosting providers will provide your own php.ini file in the root of your website installation. When you log into your web host by ftp have a look for this php.ini file. The best way to make changes is to download the file to your computer, open it with notepad, make the necessary changes and re-upload back to the server.
If you have access and are able to modify the php.ini file for your website search this line of code:
Simply change the parameter to whatever size you need EG:
Increase Upload Size by Modifying your Site’s .htaccess File
You can increase your maximum upload size by adding a single line of code to your .htaccess file.
We use this method if we do not want to modify the php.ini file or we might not have access to it.
To increase your maximum upload size add the below line of code to you .htaccess file which should be location in the root directory of your blog/website.
Simply change the 8M to your required upload limit size. EG 16M or 32M