post_max_size directing in php.ini error If you are working in Moodle you may see the error "The uploaded file may exceed the post_max_size directive in php.ini." This error is caused by a PHP limitation when trying to post data. The php.ini file controls your local PHP settings, and can be changed at any time. In this tutorial I will show you how this issue can easily be fixed in cPanel. In my tests, I got this error when installing a plugin from the Moodle Admin Dashboard.

How to fix the "exceed the post_max_size directive" error

  1. Login to cPanel.
  2. Click the File Manager button in the Files section. If the Directory Selection window pops up, click the Go button.
  3. Navigate to the folder where your Moodle is installed and click the php.ini file. Then click the Code Editor button on top. If a Code Editor box pops up, click the Edit button.
  4. You will then see the php.ini code displayed. Locate the line starting with:


    (In my tests it was around line 374)
    view of the Moodle settings causing issues
  5. Increase the value in the line, the size will differ based on what you are trying to accomplish. In my test it was set to 8MB, which I increased to 32M. The line looked like this when I was finished:

    post_max_size = 32M

  6. Click the Save button, then refresh your web page. Test what you were doing again, and it should work without the exceed the post_max_size directive in php.ini error. If you still get the error, you may have to increase the value to a higher number, or make the php.ini file recursive.

Congratulations, now you know how to fix the "uploaded file may exceed the post_max_size directive in php.ini" error in Moodle!

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 200912

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!