Why the Max File Size Error Occurs in WordPress
Well, to keep things running smoothly, The Hosting Provider defines a limitation for the upload size. It can actually vary from one server to another. Generally, it wouldn’t be a problem if the files you are trying to are less than the restriction set. However, what if you try to upload a bigger one? That’s exactly when you run into this ‘The Uploaded File Exceeds the upload_max_filesize’ error on your website.
For instance, if the maximum file upload size is restricted to only 2MB and you attempt to upload a larger file (suppose 40MB), then you would face this error. This normally happens when trying to upload Images who got higher resolutions or media files which is pretty big. You can even get this issue if you go on to insert a Plugin or Theme which exceeds the predefined size limit as well.
This has been a topic of discussion for years over the Forums such as StackOverflow, Reddit, and many other popular platforms. Even though this error might seem a bit scary but there’s a quick turnaround. You can effortlessly solve this problem with a quick solution. There are a few ways to get rid of this issue in no time. So, let’s have a look at how you can easily troubleshoot & fix it only a few steps:
Solution 1: Updating Your php.ini File
The most common way to fix this error is by making changes your php.ini file. Typically, it’s located inside the wp-admin folder. But it might differ depending on the hosting provider you are using. Once you find the php.ini file and open it. Then search for this line of code in the file:
After you are able to locate it, simply replace it with the following code:
upload_max_filesize = 256M
Simply just save the changes and refresh your website. Afterward, you can go ahead and successfully upload your preferred files without any problem. This is how by increasing the maximum file upload size, you can easily take care of this error.
Solution 2: Modifying .htaccess File
php_value upload_max_filesize 256M
php_value post_max_size 64M
php_value memory_limit 400M
php_value max_execution_time 180
php_value max_input_time 180
We have already talked about the ways you can effortlessly deal with the Upload Max File Size error in WordPress. Besides our mentioned methods, you can also modify the wp-config.php file or contact the hosting provider to get an easy solution as well. To wrap this up, all you have to do is to just increase your File Upload Size to fix the ‘The Uploaded File Exceeds the upload_max_filesize’ error in WordPress.
If you still any issues regarding the Maximum File Size Exceeding error, feel free to leave your comments here or Contact Support.