Reputation:
I tested out google cloud launcher one-click-installer and installed wordpress. Installation went fine, but when I used wordpress adming and tried to upload a theme file 22MB I got the message:
The uploaded file exceeds the upload_max_filesize directive in php.ini.
This is classic error message. I successfully made changes in the php.ini file to allow file uploads to 200MB. Saved changes and restarted apache. I even restarted the Instance but it didn't help. The problem were still there.
Does anyone knows what is the reason for this and how to solve this issue?
Upvotes: 0
Views: 3972
Reputation: 1
For an instance created from GCP for WP instance the locaiton of PHP.ini file from terminal connected from SSH is on
/etc/php/7.0/apache2/php.ini
Line 656
for Post max = 100 M change to 4G
Line 809
for Upload_max_file_size = 100 M change to 4G
Upvotes: 0
Reputation: 191
Note that the additionally to upload_max_filesize
you also have to increase the post_max_size
. This post_max_size
value manages the size of the whole POST request, so it is also necessary to increase it.
You can find the php configuration file in the following path:
/opt/bitnami/php/etc/php.ini
Once you have modified the configuration file, you have to restart the PHP-FPM
service of your instance. You can do it by executing the following command:
sudo /opt/bitnami/ctlscript.sh restart php-fpm
Hope this helps.
Upvotes: 4