Increase Maximum File Upload Size in WordPress

Written by Adrian Hart

Topics: Wordpress

In some cases the file you are trying to upload into the Media Library in your WordPress installation may be bigger than the maximum allowed size. This is a common problem, but it is easy to fix.

At Optimise Web our web servers have a maximum upload limit of 2MB. Occasionally we have clients who want to upload larger PDFs into their media library. Rather than increasing the limit for all domains, we can override this limit on individual domains. Some shared hosting accounts have similar restrictions and will not increase it for individual clients. Here’s one way you can try to override the imposed file size limit:

In the root directory of your server (the folder where your WordPress install lives), look for the .htaccess file. Open this file in your editor of choice and add the following lines…


php_value upload_max_filesize 3M
php_value post_max_size 3M
php_value memory_limit 3M

This increases the allowed file size and also the amount of memory the server allocates for running the PHP scripts need to perform the upload.

Of course 3M represents a 3MB file size. You can change this for your own value.

Leave a Comment Here's Your Chance to Be Heard!