How to increase WordPress Maximum Upload Size

10
Mar

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.

How to check WordPress Maximum Upload Size

How to check WordPress Maximum Upload Size

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:

1
upload_max_filesize = 32M 
upload_max_filesize = 32M 

Simply change the parameter to whatever size you need EG:

1
upload_max_filesize = 64M
upload_max_filesize = 64M

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

1
php_value upload_max_filesize 8M
php_value upload_max_filesize 8M

Be sure to check out our other great WordPress Snippets & WordPress Articles

Enjoy this article? If so, we would love to hear your thoughts in the comments below

 

Related Blog Posts

3 Responses to How to increase WordPress Maximum Upload Size

  1. quite informative.
    thanks for sharing

    Reply
  2. Thank you! Finally somebody explaining it in a simple way.

    Reply

Leave a Reply