admin管理员组

文章数量:1297008

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?

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?

Share Improve this question edited Mar 30, 2021 at 4:00 Run asked Mar 29, 2021 at 15:19 RunRun 3315 silver badges20 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

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

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).

本文标签: uploadsuploadmaxfilesize is set to 64 MB already but WordPress is still showing 2 MB