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:
# App Engine runtime configuration
runtime: php72
# Defaults to "serve index.php" and "serve public/index.php". Can be used to
# serve a custom PHP front controller (e.g. "serve backend/index.php") or to
# run a long-running PHP script as a worker process (e.g. "php worker.php").
entrypoint: serve gae-app.php
service: test-wp
# Defines static handlers to serve WordPress assets
handlers:
- url: /(.*\.(htm|html|css|js))
static_files: \1
upload: .*\.(htm|html|css|js)$
- url: /wp-content/(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))
static_files: wp-content/\1
upload: wp-content/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
- url: /(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))
static_files: \1
upload: .*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
- url: /wp-includes/images/media/(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))
static_files: wp-includes/images/media/\1
upload: wp-includes/images/media/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
Any ideas on how I can:
- fix the URL error above?
- enable debug logs to show up on my console? I just get
INFO 2019-05-29 10:58:02,913 module.py:861] test-wp: "GET / HTTP/1.1" 404 -
I've tried both the flags--log_level=debug
and--dev_appserver_log_level=debug
as suggested here andecho
norsyslog(LOG_DEBUG,'test')
print statements are not working as expected. On my wp-config.php, I have:define('WP_DEBUG', !$onGae);
logs viewer from stackdriver logging has logs https://console.cloud.google.com/logs/viewer? the logs include your localhost logs