Google App Engine – WordPress Importer

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:

Read More

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?

Related posts

Leave a Reply

1 comment

  1. 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:

    • Some urls that should cause a script to run, start a download
    • Some urls that should start a file download, cause a dead-end

    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.