How to Fix the Uploaded File Exceeds the Upload_Max_Filesize Error

How To Fix The Uploaded File Exceeds The Upload_Max_Filesize Error

Sometimes when it comes to uploading a file on a WordPress website, you’ll see an error message that says “upload file exceeds the upload_max_file” error. It’s a very common error, and it can be very frustrating. In today’s article, I’ll show you a few methods by which you can counter this issue.

Today you’ll learn:

  • How to fix the uploaded file exceeds the upload_max_filesize
  • Why does the “uploaded file exceeds the upload_max_file” error occurs

Let’s start with what it is and why does it occur?

How to Fix the Uploaded File Exceeds the Upload_Max_Filesize

Although some methods will be simpler than others, there are several ways in which you can easily increase the upload maximum file size limit. It’s best to do your own experiment and see which one works for you the best.

Let’s start with the simplest and the most straightforward of all the methods.

Method 1: Contact Your Hosting Provider

I know, I know but listen to me. Many people out there hesitate to contact their hosting provider, but it’s one of the simplest ways to fix the upload file that exceeds the upload_max_filesize error. We recommend using Nexcess hosting because they have the best service out of other hosting providers.

Normally when you contact the customer support of such companies, you will check the issue, and if it’s possible to solve the issue, then they will do so. The same is true for the max file size limit. Inform them of the problem by contacting them.

Keep in mind that not all the customer support teams are helpful or good, for that matter. Bluehost and Hostgator, two of the world’s most renowned companies, have some of the worst customer service teams.

According to Trustpilot, there are a total of 2513 for Hostgator and out of which 34% of them are bad. Yeah! You should get a better understanding of how the hosting is doing simply by the number of bad reviews.

Hostgator Bad Reviews
Hostgator Bad Reviews

Most of them are bad because of how bad the support is. Here is one of the comments that show how bad the customer support service is. 

Hostgator Bad Review
Hostgator Bad Review

The same is true for the Bluehost. The number of people leaving bad reviews due to bad customer support is astonishing. Almost it has the same number of bad reviews as Hostgator, which is 32%

Bluehost Bad Review
Bluehost Bad Review

So the fact of the matter is that whenever you start a website, make sure to choose a company with the best customer support; otherwise, it’ll only become a hindrance in the long run.

Method 2: Use MultiPHP INI Editor in cPanel

If, for some reason, customer support can’t help you with increasing the maximum file upload size. There is another way for you to counter this issue. You’ll need to do it manually by utilizing the cPanel.

Go to your cPanel and scroll down. Find the “MultiPHP INI Editor” and click on it.

Note: The option you’re looking for will be available in the “Software” section.

Multiphp Ini Editor
Click On The “Multiphp Ini Editor” Option

After that, you’ll see a drop-down menu on which you’ll click. Here you’ll choose the directory of the website in which you’ll change the post and upload size.

Select The Directory Of The Website
Select The Directory Of The Website

Now search for the “post_max_size” because you’ll need to increase its value.

Search For The Post_Max_Size
Search For The Post_Max_Size

To increase the size, you’ll need to enter the value MBs. Meaning if you want to increase the total capacity by 1 GB, then you’ll have to add additional 1024 MBs.

Increase The Value Of Post_Max_Size
Increase The Value Of Post_Max_Size

After that, you’ll need to search for the “upload_max_size” to increase its value.

Search For The Upload_Max_Filesize
Search For The Upload_Max_Filesize

Similar to the post size, you’ll need to add additional MBs to increase its value. After increasing the values of both the post and upload size, click the “Apply” button.

Change The Value And Click The &Quot;Apply&Quot; Button.
Change The Value And Click The “Apply” Button.

By doing this, you can easily fix the “uploaded file exceeds the upload_max_filesize” error. You can verify it by uploading any file on your WordPress website by uploading a major file.

Method 3: Increase the Max Upload File Size by Using .htaccess

There is another method by which you can increase the max upload file size for your WordPress website, and it involves tinkering with the .htaccess file. It’s not advised to use this method. It requires you to make the changes to the code file of .htaccess.

When changing the coding, you’ll need to be very careful because even the smallest error while editing can cause the file to not work. However, If you still need to proceed, this is how you can fix the uploaded file that exceeds the upload_max_filesize error.

For starters, you’ll need to open cPanel and click on the “File Managers” option.

Go To The &Quot;File Manager&Quot; Option
Go To The “File Manager” Option

After that, click on the “public_html” file.

Click The &Quot;Public_Html&Quot; Button
Click The “Public_Html” Button

Now locate the “.htaccess” file, right-click on the file, and choose the “Edit” option.

Note: This file has a “.” at the starting of the name, meaning that the file will be hidden. So if you can’t find the file, simply just change the settings to make all the hidden objects visible. 

Right-Click On The &Quot;.Htaccess&Quot; File And Choose The &Quot;Edit&Quot; Option
Right-Click On The “.Htaccess” File And Choose The “Edit” Option

It’ll notify you to backup the original file so that if you want to reverse the changes, you can do so. Just click on the “Edit” button.

Click The &Quot;Edit&Quot; Button
Click The “Edit” Button

After that, you’ll see the option to change the post and upload size at least 2 times. Change all of them, and in the end, click the “Save Changes” button.

Increase The Capacity Of The Post And Upload File Size
Increase The Capacity Of The Post And Upload File Size

If you want to upload the .htaccess file, then you’ll first need to download it. The default .htaccess runs as:

# BEGIN WordPress

RewriteEngine On

RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteBase /

RewriteRule ^index.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]
# END WordPress

Once making all the necessary changes, simply upload the .htaccess file in the root directory in cPanel.

Method 4: Changing the wp-config.php File

You can fix the same thing by editing the wp-config.php file. However, you need to remember that a single error can make the file useless. To avoid this from happening, avoid any unnecessary changes and make a backup of the file.

The first few steps are exactly the same in which you first open “File Manger” from the cPanel and open the “public_html” file.

After that, locate the “wp-config.php” file and right-click on it. From the drop-down menu, select the “Edit” option.

Right-Click On The &Quot;Wp-Config.php&Quot; And Choose The &Quot;Edit&Quot; Option
Right-Click On The “Wp-Config.php” And Choose The “Edit” Option

Once you do that, you’ll see a pop-up box telling you to create a backup of the file. Click on the “Edit” button to continue.

Click The &Quot;Edit&Quot; Button
Click The “Edit” Button

Once the file opens, paste the code the following code right below the “define(‘WP_DEBUG’, false)” to ensure that no errors occur:

@ini_set( ‘upload_max_filesize’ , ‘5000M’ );

@ini_set( ‘post_max_size’, ‘5000M’);

@ini_set( ‘memory_limit’, ‘256M’ );

@ini_set( ‘max_execution_time’, ‘300’ );

@ini_set( ‘max_input_time’, ‘300’ );

After pasting the code, click the “Save Changes” button.

Note: Ensure you don’t make any mistakes because otherwise, it can become an issue for you.

Paste The Code And Click The &Quot;Save Change&Quot; Button
Paste The Code And Click The “Save Change” Button

Method 5: Editing the php.ini File

Another method of fixing the uploading size issue is that you can play around with the php.ini file, and it goes without saying that this method is only for those who have some knowledge of coding.

First, go to the “MutiPHP Manager” in the cPanel. You can find it in the “Software” section.

Click The &Quot;Multiphp Manager&Quot; Option
Click The “Multiphp Manager” Option

After that, select the website and look at its PHP version.

Select The Domain And Check The Php Version
Select The Domain And Check The Php Version

Next, click on the drop-down menu, select the PHP version you want, and click the “Apply” button.

Click The Drop-Down Menu And Select The Version For The Website
Click The Drop-Down Menu And Select The Version For The Website

Please return to the cPanel and select “File Manager.” 

Go To &Quot;File Manager&Quot; Option
Go To “File Manager” Option

After that, open the “public_html” file.

Open The &Quot;Public_Html&Quot; File
Open The “Public_Html” File

Find the “php.ini” file, right-click on it, and select the “Edit” option from the drop-down menu.

Right-Click On The &Quot;Php.ini&Quot; File And Choose The &Quot;Edit&Quot; Option
Right-Click On The “Php.ini” File And Choose The “Edit” Option

Click the “Edit” button on the pop-up.

Click The &Quot;Edit&Quot; Option
Click The “Edit” Option

Change the post & upload size and click the “Save Change” button on the top right-hand corner of the screen.

This Way You Can Fix The Uploaded File Exceeds The Upload_Max_Size Error
This Way You Can Fix The Uploaded File Exceeds The Upload_Max_Filesize Error

Why Does the “Uploaded File Exceeds the Upload_Max_File” Error Occurs

The “uploaded file exceeds the upload_max_filesize directive in php.ini” error typically appears when you are trying to upload a file that is too large for PHP to process. This can happen if your server’s PHP settings are not configured correctly or if you are attempting to upload a particularly large file.

If you are getting this error, it is likely that your server’s PHP settings need to be adjusted. The upload_max_filesize value in your php.ini file can be increased by contacting your web hosting provider or server administrator. Alternatively, you can try uploading your file in smaller chunks if possible.

However, you might be asking yourself that “I bought the best hosting plan with unlimited hosting and storage. I shouldn’t be facing this issue” The truth is that many companies use the word “unlimited” to misdirect you. 

Unlimited Plans Offered By Hosting Services
Unlimited Plans Offered By Hosting Services

The amount of data you can use is limited. Some hosting providers have fair-usage policies, which intend to preserve the resources for all customers and ensure that those who use too much won’t abuse their accounts by consuming everything in sight.

Their server is so efficient that they can easily handle 90% of the websites with no threat to their valuable resources. 

There are limitations placed on what you are allowed to do in terms of file size and how often your site will be accessed again following a previous load. These restrictions ensure a significant amount of storage is saved each time your site is loaded.

There are a lot of guides available on the internet that don’t work to fix your issue with uploading photos since they only try increasing upload_max_filesize, but post size is also critical in solving this problem.

For example, Namecheap doesn’t allow you to upload more than 300,000 files or inodes on their shared hosting plan, and the maximum size limit is just 50MB.

Conclusion

By using these 5 methods, you can easily make changes to the core files of the WordPress website and can fix the “uploaded file exceeds the upload_max_size” error.

Throughout these methods, you might be asking yourself that “Why do I have to change the post size as well as the upload size?” To put it simply, you may be able to upload the file to your size once changing only the upload size, but you won’t be able to post that file. So it’s important that you match both sizes.

If these methods worked for you, don’t forget to mention them in the comment sections below and also share this article with your circle.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to our Monthly Newsletter

Get monthly updates of WordPress tips, tricks, and tutorials in your email.

Thanks. You have successfully subscribed.

Pin It on Pinterest