‘This file exceeds the maximum upload size for this site.’
Anyone who has ever gotten this error knows how frustrating it can be, especially when the file in question is an important one.
By default, WordPress allows file uploads of up to 150MB, but this is also dependent on your web hosting provider.
This limit becomes a problem for obvious reasons when you need to upload larger images and videos to your site.
This begs the question, how can you increase the maximum file upload size in WordPress?
Well, here are five effective ways!
The built-in media uploader on WordPress is a time saver as it enables you to upload files without using your hosting provider’s file manager or connecting with an FTP client.
However, it comes with its own set of limitations: an upload limit on the maximum size for files.
This limit is dependent on two factors; your WordPress configuration and the limit set by your hosting provider.
To check your current upload file limit on your WordPress site, log in to your WordPress dashboard and go to Media > Add New
.
The maximum upload file size is displayed below the uploader:
Most times, the limit set by the WordPress media uploader should be enough for regular use, but there are plenty of scenarios where you may need to upload larger files.
Here’s how to deal with the “This file exceeds the maximum upload size for this site” error.
If you are comfortable editing your WordPress theme files, editing your theme’s functions.php
file is a quick fix option.
You can modify the functions.php file right from your WordPress admin area by going to Appearance > Theme Editor
and selecting the functions file.
From there, simply add the following code to the end of the file:
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
Save your changes and you’re good to go!
Note: We always recommend using a child theme to modify your functions.php
file—otherwise your changes may be overwritten by a future theme update. Also keep in mind that this change will be undone if you switch to a different theme in the future.
Your web hosting provider may set an upload limit on your site in order to preserve their hosting resources.
The php.ini
file is used to configure all actions and applications running on PHP and also contains the file upload parameters.
This method requires you to access your WordPress site’s root directory via FTP or SSH.
There are cases where this file is not visible, especially when you have shared hosting, so you may need to create a php.ini
file and upload it to the root folder.
Open the php.ini
file and paste this code:
upload_max_filesize = 25M
post_max_size = 13M
memory_limit = 30M
Use FTP or SSH to upload this file.
This method is most effective for WordPress sites on web servers that use Apache, and it involves editing the .htaccess
file in the root directory of your WordPress site.
Use an FTP client and locate the WordPress root directory (usually public_html
).
This file may be hidden by default, so you may need to enable the “show hidden files” option to locate it.
Open the .htaccess file and paste the following code:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
You can replace the numbers according to your unique requirements. The input and execution time are measured in seconds and define the time spent on a single file upload.
If the above methods are a bit technical for your taste, you can also get the job done with a plugin.
Specifically, you’ll want to install the Increase Maximum Upload File Size plugin.
After installing the plugin, simply go to Settings > Increase Maximum Upload File Size
and select your preferred maximum file size:
If none of the above methods work, contact your hosting provider for help.
In some hosting environments, a system administrator may need to increase the maximum file size for you.
Make sure your WordPress site is hosted by a highly responsive hosting provider to ensure you receive help in a timely manner.
The file upload size limit error can be quite annoying, but the techniques above should help you to get it resolved ASAP.
Do you have more methods that WordPress site owners can use to increase the maximum upload file size? Feel free to share in the comments section, along with which method worked best for you!
Are you looking to reset a WordPress site and start fresh? Reset a WordPress Site…
Ready to build your online presence? Choosing the right platform between Wix vs. WordPress is a crucial first…
Changing your favicon in WordPress is a small yet powerful way to improve your website’s…
Have you been searching for the easiest way to share PDF files directly on your…
Ever notice how professional websites seamlessly display social media icons in their headers? Adding social…
WordPress caching is an incredible tool for boosting your website’s performance. It helps deliver faster…
View Comments
The functions.php code works wonders. Bookmarking for when I inevitably run into this issue on another site