WordPress

How to Increase Maximum Upload File Size in WordPress

How to Increase Maximum Upload File Size in WordPress
Written by Karan Arya
(Last Updated On: May 26, 2019)

Are you looking for a way to increase maximum upload file size in WordPress from 2 MB to 64 MB? Some times low file upload size limit can stop you from uploading files via media uploader, or install plugins and themes.

WordPress comes with its own media uploader. It makes uploading files to a blog an easy task – there is no need to deal with FTP clients or File Managers.

WordPress maximum upload file size

In WordPress, when you try to upload a bigger size media file, you get a message “file exceeds the maximum upload size for this site“. 

The error can be very frustrating. Many hosts keep this limit low by default.

So in this post, we will dig into the root of the problem and provide you with some quick ways to resolve this issue and get back to uploading your files.

Table of Contents

What you’ll need

Before you begin this guide you’ll need the following:

  • Access to hosting control panel
  • Access to WordPress administrator dashboard

How to Increase Media File Maximum Upload Size in WordPress?

There are many different ways you can change the upload limit in WordPress. We will show you different methods and you can apply any of them that you are comfortable with.

Method 1, Edit Your .htaccess File

To increase WordPress upload limit, log into your web hosting cPanel account and go to the root directory where your WordPress is installed.

Open up the .htaccess file and add the following code at the end.

php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_time 300

Once added, don’t forget to save the file.

Now go to your WordPress dashboard Media> Add New and check whether the upload limit is changed.

Method 2, Create or Modify php.ini File

If the above .htaccess solution didn’t increase WordPress upload limit, then you need to apply this php.ini method. 

Go to your hosting cPanel account and go to the root folder. Find the php.ini file. If there is no php.ini file, simply create a new one.

Edit the php.ini file and add the following lines.

memory_limit = 256M 
post_max_size = 256M
upload_max_filesize = 256M

Once done, save the file.

Now recheck your maximum upload file size by going to Media> Add New.

Method 3, Theme Functions File

There are cases where we have seen that just by adding the following code in the theme’s functions.php file, you can increase the upload size:

@ini_set( 'upload_max_size' , '64M' ); 
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

Conclusion

As you can see, increasing the WordPress maximum upload file size isn’t too complex, it’s just a matter of knowing where to look and which commands to use.

In this tutorial, we have covered 3 different ways to change the WordPress File upload limit. What solution worked for you? Do let us know in the comment section.

You May Also Like

5

Bluehost Coupon

Get over 63% off on Bluehost packages and a free domain of your choice. View this Deal »

Sending
User Review
3 (1 vote)

About the author

Karan Arya

Karan Arya is a Mechanical Engineer, founder, and author of Minidea. He's a blogging enthusiast and very fond of coding. He's been blogging since 2016 and has learned so many interesting things pertaining to blogging, SEO, and online earning. He has launched this blog to cover blogging related topics.

Leave a Comment

0 Shares
Share
+1
Tweet
Pin
Share