0

I have configured the upload_max_filesize directive to 64 MB in my localhost php.ini and have my Apache restarted.

But why the Media section in my WordPress still showing 2 MB below?

Maximum upload file size: 2 MB.

So any file is more than 2 MB, I get this error below:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

Any ideas what else I have to configure?

EDIT 1:

I also have set post_max_size = 64M to match upload_max_filesize = 64M in php.ini and have my Apache restarted.

EDIT 2:

Found the problem. I am running on a PHP Development Server. And probably because of this, WordPress cannot read my php.ini. It is fine on my production server.

So that's no why to increase the upload_max_filesize on a PHP Development Server then?

2 Answers 2

1

You have to set post_max_size = 64M to match upload_max_filesize = 64M in php.ini

1
  • done that already too
    – Run
    Commented Mar 30, 2021 at 3:17
1

There's a filter that may be set: upload_size_limit. Check to see if this filter's being used in a plugin or your active theme.

It's also possible, if you've got a lot of files uploaded, that you're running out of disk space (or, if this is a site in a Multisite network, you may be getting close to the site's quota).

2
  • Thanks for the answer. I have found out what the problem is.
    – Run
    Commented Mar 30, 2021 at 3:56
  • see my edit 2. thanks
    – Run
    Commented Mar 30, 2021 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.