首页 > 解决方案 > How to run Google App Engine WordPress blog locally

问题描述

Following the Wordpress on GAE tutorial, I have managed to successfully deploy my blog to App Engine. However, I would like to be able to run my blog locally as I continue its development, so that I can inspect error logs, etc. Using the GAE dev server, I try to run it like so:

dev_appserver.py --log_level=debug app.yaml --php_executable_path=/usr/local/bin/php

But I run into this problem:

The url "/" does not match any handlers.

I have not changed my app.yaml nor any other file (the ones auto-created by the wp-gae.php step in the tutorial). It looks like this:

How to Run Wordpress Blog on Google App Engine Locally

dev_appserver.py --log_level=debug app.yaml --php_executable_path=/usr/local/bin/php

the blog should run on my local setup

标签: google-app-engine

解决方案


根据这个论坛链接,您需要指定 php-cgi 可执行文件。

export CLOUDSDK_PYTHON=$(which python2) && dev_appserver.py --support_datastore_emulator=False --log_level=debug --php_executable_path=$(which php-cgi) app.yaml

我还必须向 app.yaml 添加一个处理程序以使站点正常工作,确保它是最后一个处理程序(最低优先级)

- url: .*
  script: gae-app.php

推荐阅读