Can't increase upload_max_filesize in a Wordpress LAMP stack

1

I've been trying to increase the maximum upload size of my Wordpress instance, and I've already tried all methods mentioned in the results I get when searching this issue.

I've tried changing the php.ini file, the .htaccess, the wp-config.php, etc. and it's still doesn't change from 2MB.

This might be important:
If I run php -i and find the upload_max_filesize, it shows up with the increased value, but when I print a phpinfo();, it displays the default 2MB, even though both display the same path in "Loaded Configuration File".

Do you have any idea on what I'm missing? It's getting very frustrating.
Thanks in advance

joao-m-santos

Posted 2019-02-06T15:20:08.940

Reputation: 11

When you changed your php.ini file did you restart the Apache process? – Kinnectus – 2019-02-06T15:26:22.883

What are your php.ini values for upload_max_filesize and post_max_size? – Kinnectus – 2019-02-06T15:27:20.310

@Kinnectus I did restart. upload_max_filesize is 256M and post_max_size is 256M also – joao-m-santos – 2019-02-06T15:43:19.140

Also, you say you changed php.ini yet when you run phpinfo it doesn't show the updated value. As MrNiceGuy points out it could be permissions on the file OR, if you look at the phpinfo output, you may have edited the wrong file? Make sure the file is the one identified in phpinfo... – Kinnectus – 2019-02-06T15:48:00.430

Have you checked in the WordPress dashboard, Settings, the value of “Max upload file size”? You may also change it here. – harrymc – 2019-02-06T19:03:54.140

@harrymc I do not have that option in my Wordpress v5.0.3 Settings – joao-m-santos – 2019-02-07T09:27:59.750

Answers

0

If your changes to the php.ini and wp-config.php are saved correctly, check file permissions/ownership. Make sure your web user can make use of the file.

MrNiceGuy

Posted 2019-02-06T15:20:08.940

Reputation: 1

I've already checked, all files have read permissions for everyone and are in the same group as the web user. – joao-m-santos – 2019-02-06T15:49:47.580