The uploaded file exceeds the upload _max_filesize directive in PHP.ini error in WordPress is the most common error that you have come across once for sure. It’s a pretty common error in WordPress and can be quickly fixed with the right set of features. In this guide, I will show you effective ways to fix ‘upload_max_filesize error in WordPress. So, let’s get busy.

WordPress is dominating the digital arena and it has gained immense popularity around the globe by powering over billions of websites. Every user, especially beginners, relies on the WordPress content management system. The simplicity and the flexibility to extend this platform is unmatched. That’s the reason even professional developers also use this platform to create a website.

Moreover if after creating your website, you feel the need to extend the functionality, you can easily do that as well. There are tons of useful WordPress plugins available that can easily let you extend the usability. Therefore, using WordPress is not only simple but helpful also. If you are already using WordPress, then you must know how capable and efficient this platform is. But sometimes you may face different kinds of errors. Upload_max_filesize is one such error that can hinder your website development.

So, let’s learn how you can deal with it, without hampering other features. In this guide, I will walk you through the easiest possible solutions to fix the ‘Uploaded file exceeds the upload_max_filesize directives in php.ini’ error in WordPress. This error occurs while you try to upload large files, images, plugins, or themes. Basically, this error comes into existence when server-side settings limit the file sizes.

Wait a minute! Before we head to the solution, it makes sense to understand why this error even occurs. So, before we learn how, let’s first go through why.

Why Uploaded File Exceeds upload_max_filesize Error in WordPress Occur?

Of course, we all know about WordPress hosting providers such as Bluehost, Kinsta, SiteGround, etc. Sometimes in order to make everything work smoothly, your hosting provider may put in some limitations for the file upload size. However, it varies from one hosting server to another. When you are uploading files that are less in size, then it won’t be any problem. However, you get to see the ‘upload_max_filsize’ error in WordPress when you try to upload a file that is more than the defined size.

Ways to Fix Uploaded File Exceeds upload_max_filesize Error in WordPress

Solution 1: Update Your php.ini File

Update Your php .ini File

This is one of the widely used solutions to fix ‘upload_max_filesize’ error in WordPress. All you have to do is make some changes to your php.ini file. Generally, you will find this file under the wp-admin folder of your website. However, sometimes it may be located at some other location, depending upon your hosting provider.

So, once you have access to your php.ini file, search for this particular line of code in the file – upload_max_filesize. Once you have found the code, you are now required to increase the value of max upload size in order to fix the error. Here for example I have increased it to 256MB

upload_max_filesize = 256M

Once you have made the changes and refreshed your website you will see that the ‘upload_max_filesize’ error in your WordPress website has now resolved. Now, you can quickly upload the files upto 256MB.

Quite easy! Right? Well, you can easily do that yourself and make your WordPress website error-free.

Solution 2: Edit the .htaccess file

This is another quick fix to get rid of the ‘upload_max_filesize’ error in WordPress. Whichever hosting provider you are using, it will allow you to make edits in your .htaccess file. So, you can make use of that and remove the error. And once it is done correctly you will be able to upload files with higher sizes as well.

Generally you can find this .htaccess file in your WordPress root directory. Locate it and open it and then add the following line of code at the bottom of this file.

php_value upload_max_filesize 256M

And now save the changes to confirm your choice. After adding this line of code you shall be able to upload maximum file size.

Solution 3: Modify the wp-config.php File

This is another super simple and useful method to fix this ‘upload_max_filesize’ error in WordPress.

Step 1: Go to the public_html folder using cPanel.

Step 2: Look for the wp-config.php file. Simply right-click on the file and choose the edit option.

Step 3: Search for the comment line in the file. However, it is possible that it will be available at the end of the file. The comment line is;

“That’s all, stop editing! Happy blogging.”

Step 3: Now add the following line of code right above the comment line.

@ini_set('upload_max_size' , '256M' );

Step 4: Quickly save the changes in the file and exit. Refresh the website and try to upload the file again.
That’s it!

Solution 4: Modify Other PHP Configuration Settings

At times making changes in some other php files can save you a lot of time and effort. They are;

  • post_max_size (the maximum size for each POST data);
  • memory_limit (this is the maximum amount of memory a script can hold);
  • max_input_time (this is the maximum time in seconds that a script is allowed to parse input data such as GET and POST);
  • max_execution_time (this is the maximum time in seconds that is permitted to a script to take to run before it is terminated by the parser );

Solution 5: Contact Your Web Host Provider for Support

If you have tried everything but nothing worked at all. Then contacting your web host provider is the only solution you are left with. Because it is very common that web host providers put some restrictions or limitations on the settings customers can modify themselves. However, it entirely depends on your web host provider company what type of imitation they have employed on your WordPress website.

In some cases, where users have tried everything, they have to contact their web server providers for better as well as effortless results. , Bluehost generally put less restrictions and allow you to make these changes yourself.

So, these were some of the methods to fix ‘upload_max_filesize directives in php.ini’ error in WordPress. You can try whichever method you find easy or best for your website. However, all of them are tried and tested methods. So, you can try any one of them to fix this WordPress error. Of course, if nothing is working then you surely have host server provider customer support with you. Try that.

Uploaded File Exceeds upload_max_filesize Error in WordPress – In Conclusion

Now you know how to fix the ‘Uploaded file exceeds upload_max_filesize directive in php.ini’ error in WordPress. I tried to cover very easy methods that can help you get through this error without any difficulties. No matter which method you choose, simply by following the given instructions you can solve this error and get started with your WordPress website. Once you have successfully fixed the error you will be able to define the maximum size while uploading the files of your choice to your website.
However, if you still have some problems dealing with your files. You can anytime switch to FTP upload. FTP does not have any limits and it will enable you to upload files seamlessly. I hope I was able to help you with your WordPress error problem. Please feel free to share your experience with me in the comments below.