Reputation: 3024
I have recently installed Wordpress on Google App Engine for PHP. Remote image uploading works - so it appears bucket storage is set up correctly. Also, I can create and delete pages and posts - so cloud SQL is working right.
The problem is - the Wordpress remote importer (a plugin that uses an XML file to add content to the database) does not work - the error message I get is:
File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.
Should I be able to use the Wordpress Importer plugin in App Engine? If so, what are steps I could take to fix this error?
Upvotes: 1
Views: 676
Reputation: 3024
I figured out a problem that may be related:
It turns out that the app.yaml
file that Google recommends does not handle routing well for some Wordpress themes and plugins.
Here is a sample of the app.yaml
lines I had to change/add:
handlers:
- url: /wp-content/themes/fuse/library/css/custom.css.php
script: wordpress/wp-content/themes/fuse/library/css/custom.css.php
- url: /(.*\.(htm$|html$|css$|js$|ttf$|jpg$|jpeg$|otf$|woff$|svg$))
static_files: wordpress/\1
upload: wordpress/(.*\.(htm$|html$|css$|js$|ttf$|jpg$|jpeg$|otf$|woff$|svg$))
application_readable: true
The above lines change App Engine routing to fix two separate problems:
For fixing the Wordpress Importer, I also tried adding the line upload_max_filesize = 8M
to my php.ini
file. That edit did not appear to fix the problem.
I suspect that the Wordpress importer should work on App Engine - but I can't say for sure. Hopefully someone with more expertise will give a better answer.
Upvotes: 1