I'm a noob and using Wordpress on Google cloud. When attempting to upload a new theme, I get the following error message:
The uploaded file exceeds the
upload_max_filesize
directive inphp.ini
.
This is a limitation seems to be set by Google Compute Engine. I've found info about the limitation being set in the php.ini
file, but I can't seem to locate that file anywhere.
Can anyone give some idiot proof, step-by-step instructions to increase the upload size beyond 2MB? I've installed the WP plug-ins that should do this, but the problem must be server side.
In the dropdown, select a PHP version. PHP versions have independent configurations, so you must edit the max upload variable for all versions you wish to change. Scroll to upload_max_filesize and edit the adjacent value before clicking Apply at the bottom of the page. Ensure that post_max_size is at least as large.
Open WordPress admin, go to Plugins, click Add New. Enter “increase maximum upload” in search and hit Enter. Plugin will show up as the first on the list, click “Install Now” Activate & open plugin's settings page located in the main admin menu.
I'm not sure what operating system you are using or what version of PHP you are using. I run an Ubuntu 12.04 instance from Amazon Web Services using PHP-FPM. But, the instructions should be basically the same for you. The directory where your php.ini file is saved may be slightly different in item 3. Go hunt for it.
sudo /bin/bash
nano /etc/php5/fpm/php.ini
upload_max_filesize = 2M
. In nano, you can search by typing Ctrl W. upload_max_filesize = 200M
or =1G
). Aim for the lowest number that you NEED, and keep in mind that PHP has another setting elsewhere that sets how long it will wait before a timeout. You can set a 2G upload limit, but if your timeout is 30 seconds you're still going to fail unless you can upload 2G in 30 seconds. As a general rule, aim low.
service php5-fpm restart
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