1

I'm having trouble uploading my desired WP template (5mb), to my live site on vm instance within Google Compute Engine.

I've tried every ssh command I've been able to find, in order to increase the php.ini file limits and restarted apache etc. When I access them now, they appear to be amended as desired. However, when I re-attempt the install, I get the same file limit error within WP.

I've tried to sftp the files over to the WP folders using Fetch on OSX, to no avail. Permissions kept getting me.

Note that when I access top level WP folders/files, all the usual suspects folders/files are there... all except the .htaccess file?

Which leads me on to my question. Is it normal for a Google Cloud Launcher installed WP instance to have this missing, or is it in another location? Either way how best to check and if it isn't there what's the best process to push it over?

Also, I'm Looking to address the file limit issue mentioned above through: the following .htaccess entry:

php_value max_execution_time 3600
php_value upload_max_filesize 20M
php_value post_max_size 220M
php_value memory_limit 1024M

Any help is greatly appreciated.

Kind regards,

Craig

EDIT in relation to Wogsland's answer, see image below:

apache on Google Cloud Engine

VanGTO
  • 23
  • 1
  • 5
  • I believe this is the answer here: http://stackoverflow.com/questions/28018512/wordpress-upload-file-size?rq=1 – DevWPchi Jul 16 '16 at 12:45

2 Answers2

0

The Google Cloud doesn't use Apache, hence no .htaccess file.

wogsland
  • 9,106
  • 19
  • 57
  • 93
  • Don't think that's entirely accurate Wogsland. I've edited the post to include a link to a screenshot of the instance. Deployment Manager indicates that it is currently running the following: Operating System Debian 8 Software Apache HTTP Server (2.4.10) MySQL (5.5.46) PHP (5.6.14) – VanGTO Jun 03 '16 at 09:24
  • Things change I guess. Literally moved a PHP application from Google Cloud several months ago (to upgrade to PHP 7) and they were using yaml files for configuration because they had their own PHP interpreter. And the yaml file setup was a lot less powerful than what's available in an htaccess file. – wogsland Jun 03 '16 at 12:42
0

By deploying a new WP instance using Cloud Launcher and then SSH on it two different files appear:

user@wordpress-1-vm:~$ sudo find / -name "php.ini"
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini

Following the instruction on this discussion to identify the php.ini file being used.

How to know which php.ini is used?

php -i|grep 'php.ini'

Configuration File (php.ini) Path => /etc/php5/cliLoaded Configuration File => /etc/php5/cli/php.ini

In the same way you can also find .htaccess files:

user@wordpress-1-vm:~$ sudo find / -name ".htaccess"

/var/www/html/wp-content/plugins/akismet/.htaccess

Same topic is being discussed here. After making the changes in the configuration file make sure to restart the service.

Carlos
  • 966
  • 7
  • 15