I am using Easyengine for a WordPress site, and I need to upload a large file to the server, I know I can use FTP / SSH to do so but in the long run I need it to be done via PHP, and the current upload limit that I see is 100M
when doing phpinfo();
The setup uses PHP 7 and the PHP INI
file that I found is at
etc/php/7.2/php.ini
I made changes to these parts:
upload_max_filesize = 2100M
post_max_size = 2100M
But even after this the upload limit is 100M as I can see on both WordPress plugin page that I am using as well as with phpinfo()
I read somewhere that Nginx needs to be restarted so I did ee site restart example.com
and both Nginx and PHP were restarted still no effect.
Some articles suggested adding a rule to /etc/nginx/nginx.conf
but unfortunately that path doesn't even exist, so I created that file at that path and tried but still no use.
To troubleshoot your issue, I'd take the following steps:
php.ini
path to check if you're editing the right oneTo find your php.ini
, create a file called info.php
or any other name in your webroot and add the following:
<?php phpinfo();
Now, go to your browser and visit: http:///test.php. On the resulting page search for:
Configuration File (php.ini) Path
That will show you your php.ini
location
Check if your PHP script isn't overwriting your settings using ini_set()
Check if your settings aren't overwritten in your pool.d
fpm config file.
/etc/php/*/fpm/pool.d/www.conf
Make sure you restart php-fpm
and nginx
.
sudo /etc/init.d/php-fpm restart sudo /etc/init.d/nginx restart
I also faced this kind of issue. I was editing wrong file located at /etc/php/8.0/cli/php.ini instead of correct one. Because nginx uses php-fpm version. So correct file was /etc/php/8.0/fpm/php.ini
And don't forget to kill current fpm process with sudo pkill php-fpm8.0 command. then type sudo service php8.0-fpm to start service normally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With