How to Increase Maximum Upload File Size in WordPress

Karn Arya
4 Min Read
Increase Maximum Upload File Size in WordPress
Increase Maximum Upload File Size in WordPress

Are you looking for way to increase the maximum upload file size in WordPress? WordPress comes with its own media uploader. It makes uploading any files on the website a very easy way there is no need hosing Cpanel credentials and FTP account.

Some times maximum upload file limit is 8MB so it can stop you from uploading files above 8 MB via media uploader, or upload website theme and install the plugin.

In this tutorial, we have covered 3 different ways to change the WordPress File upload limit.

WordPress maximum upload file size

In WordPress dashboard, when you upload a bigger file you get to give an error 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 share some quick ways to resolve this issue and get back to uploading your files on WordPress.

What you’ll need

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

How to Increase 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 the WordPress upload file size limit, then you need to apply this php.ini process.

Go to your hosting cPanel account and go to the root folder. Find the php.ini file. If in your hosting no Php.ini file, so simply create a w file with the name.

Creating php.ini File in wordpress

GO to edit option in 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 limit by uploading the file 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, howto increase the maximum upload file size limit? This process isn’t too complex. What solution worked for you? Do let us know in the comment section.

To get SEO and digital marketing tips or to be successful in blogging, you must follow our blog Minidea on social media Facebook. Thank you.

Share This Article
Leave a comment