If you upload a lot of files to your WordPress site you may have seen this error while uploading “exceeds the maximum upload size for this site”. Especially if you are uploading large PDFs or video files.
Many WordPress hosts set this limit low by default. So if you are unable to upload files since they are too large I’ll be showing you how to increase the WordPress maximum upload file size in this post.
How to Check Your Maximum File Upload Size Limit in WordPress?
First you’ll probably want to know your site’s current maximum file upload size limit. This can be done by going to Media>add new. On the media upload page you’ll see your sites current maximum upload file size.
Now that you know your site’s limit let’s increase it!
How to Increase Max Upload Size in WordPress with a Plugin
The easiest way to increase the max file upload size in WordPress is to use the Tuxedo Big File Uploads plugin. This plugin lets you change the max upload size on your WordPress site without code.
Using this plugin is as simple as installing the plugin then changing its settings. This can easily be done by going to Plugins>add new and searching “Tuxedo”.
After this is installed and activated you’ll have a new options under Settings>media here you’ll be able to set your max file size.
Here you can set the max file size to whatever you’d like. I recommend only setting it to what you need and not leaving it as unlimited. In this example I set the max file size to 512mb.
How to Increase Max Upload Size in WordPress with Function.php
You can try increasing your server’s max upload size with this PHP code snippet in your site theme’s function.php file. Note that this may not work depending on how your site’s server is configured.
<?php | |
@ini_set( 'upload_max_size' , '128M' ); | |
@ini_set( 'post_max_size', '128M'); | |
@ini_set( 'max_execution_time', '300' ); |
If this code snippet doesn’t work you I recommend reaching out to your web host for assistance.
I hope this post helped you increase your maximum file size in WordPress, of course if you have any questions let us know in the comments.
Additionally if any of the above is too difficult your WordPress host should be able to help you with this as well.
4 Responses
Very Helpful Plugin, I am facing a big problem with this file size. Now I can upload a bigger file. Thanks for sharing.
yeah! this plugin is awesome , When I didn’t know about it, faced this problem many times and after searching a bunch of blog and YouTube channel I found this plugin. Thanks for the article.
so we can use this plugin if we dont have access to our php option on hosting server, right ?
Hey Morgan, it depends on how your hosting environment is setup, many hosts disable the option but it may work!