Have you ever tried to upload something on WordPress, only to be greeted by this eerie message saying “the uploaded file exceeds the upload_max_filesize directive in php.ini”?
It is understandable how frustrating it can be when an error like this ruins your workflow or even your whole day. And to top it off, for someone unfamiliar with an error like this, it can be very time-consuming and frustrating trying to figure out the cause and solution to it.
But have no fear, we understand your frustration because we’ve all been through this trying to work with WordPress at some point in time, and we know how much time an error like this can take up from your working hours.
So, don’t worry and sit back tight, we’ll show you some quick and easy solutions to this problem.
This error occurs when you try to:
Here we’ll show you a step-by-step guide on how you can solve this issue.
Many reputable hosting companies bolster their ad campaigns using words such as “unlimited, unrestricted, uncapped, etc.”
But that is simply not true. Ad campaigns containing taglines such as “unlimited in terms of storage and bandwidth” are far from reality.
Certain companies tend to save up on their valuable resources by putting restrictions on their servers by not allowing files with a size exceeding 25 Mb or higher.
The answer is a resounding no. WordPress has nothing to do with php.ini. Or the error that ensues titled “the uploaded file exceeds the upload_max_filesize directive in php.ini.”
This php.ini. doesn’t come with the default WordPress installation.
You can check it yourself, by downloading the original WordPress file straight from the official website.
All the limitations that proceed to the uploaded file exceeds the upload_max_filesize directive in php.ini. WordPress error is imposed by the hosting services and the server’s end of the whole ordeal.
Let’s start with the solution:
If your hosting service provider uses cPanel, you can edit your php.ini. and customize the upload_max_filesize directive value via the cPanel.
cPanel makes it easy for users to manage their websites right from one panel.
cPanel provides a dedicated tool for increasing the max upload size limit called “MultiPHP INI Editor”.
From the “MultiPHP INI Editor”, you can edit the values for the max upload size limit.
From the MultiPHP Panel, click on the ‘’Configure PHP INI basic settings’’ drop-down menu and select your WordPress website from this menu.
Here, you will find selected PHP directives. To solve your upload_max_filesize issue, edit the following values as per your requirement.
Enter your required value and put “M” after that, which stands for Megabytes.
Congratulations, you’ve just edited your max file size value to 3GB.
As you know, how the php.ini file controls, how your server works with PHP applications.
Start by connecting to your server via FTP and go to the website’s root folder.
You can edit the php.ini file already present in the root folder or create a new file named php.ini:
Add or modify the code snippet given below:
Paste the code snippet into a new file, and adjust the numbers to suit your needs.
Alternatively, if you’re editing an existing file, find the same directives and modify the numbers accordingly.
upload_max_filesize = 12M post_max_size = 13M memory_limit = 15M
The upload_max_filesize directive can also be modified by editing your website’s .htaccess file if creating or editing the php.ini file does not work.
The first thing you need to do is connect to your website via FTP and edit the .htaccess file found in its root folder.
Add the following code snippet, ensuring that you’ve adapted the values to as per your requirement:
php_value upload_max_filesize (Value) php_value post_max_size (Value) php_value memory_limit (Value)
Bonus, For you GoDaddy users out there:
If you are facing a GoDaddy the uploaded file exceeds the upload_max_filesize directive in php.ini. error while trying to upload a new theme to your WordPress website or any large file.
Then follow these steps, and you should be able to solve this issue:
Step 1: Click on “My Account” on the GoDaddy dashboard.
Step 2: Click on the “Web Hosting” tab & the “Manage” button.
Step 3: Visit the cPanel Admin dashboard.
Step 4: Click the “File Manager” icon.
As you click the “File Manager”, you will see a popup menu to select a directory. Select the “Document Root for”.
Step 5: Right-click on the “.htaccess” file.
You will find the “.htaccess” file right under the “wp-includes” folder. Then, click “Edit” on the popup box.
Step 6: Add the following code & hit save
php_value upload_max_filesize 256M
By following these simple steps, you will be able to resolve the uploaded file exceeds the upload_max_filesize directive in php.ini GoDaddy issue.
And not just GoDaddy; similar steps can be used to resolve the same issue on all the popular web hosting services such as – Bluehost, Hostgator, Hostinger, Dreamhost, etc.
After you’ve successfully implemented all these changes, we hope that you’re – the uploaded file exceeds the upload_max_filesize directive in php.ini error has been resolved.
If all went well, your php.ini edit worked perfectly and the values you have changed fixed your issue.
To check if all the changes have been implemented, just head back to your WordPress Dashboard > Media > Add New and try to upload the file, you were initially trying to upload. Now you should be able to upload the said file, without any worries.
Finally, we hope that you’ve found this helpful. Please do share this with someone who is going through a similar issue.