Support » Localhost Installs » Trouble running local WordPress in Google App Engine

  • OC2PS


    Following these instructions:

    Installed MySQL, Python and Google App Engine PHP SDK on a Windows 8 PC. Perfect!

    Created an app for WordPress, created database and user on localhost and edited WordPress config accordingly.

    Started the app in the Google App Engine Launcher. Clicking Browse leads to blank page at http://localhost:8080/


    Checked logs, found

    2013-11-26 17:56:18 Running command: "['C:\\Python27\\python.exe',
    'C:\\Program Files (x86)\\Google\\google_appengine\\',
    '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000',
    INFO     2013-11-26 17:56:19,805]
    Skipping SDK update check.
    WARNING  2013-11-26 17:56:19,813]
    Could not initialize images API; you are likely missing the Python "PIL" module.
    INFO     2013-11-26 17:56:19,822]
    Starting API server at: http://localhost:53853
    INFO     2013-11-26 17:56:19,826]
    Starting module "default" running at: http://localhost:8080
    INFO     2013-11-26 17:56:19,828]
    Starting admin server at: http://localhost:8000
    INFO     2013-11-26 17:56:21,828] default: "GET / HTTP/1.1" 302 -

    Pretty certain the Python for Windows package I used included PIL. Besides, that “shouldn’t” matter.

    Even more troublingly, the last line of the log output is a HTTP redirect from / to another page…the output appears to have been interrupted.

    Not sure where to go from here…

Viewing 15 replies - 1 through 15 (of 26 total)
  • OC2PS


    If I go to http://localhost:8080/wp-admin/ though, I get

    Warning: chdir(): Invalid argument (errno 22) in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 42
    Warning: require(wordpress/wp-admin/wp-admin/install.php): failed to open stream: No such file or directory in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 103
    Fatal error: require(): Failed opening required 'wordpress/wp-admin/wp-admin/install.php' (include_path='C:\Users\CsillamVilag\Documents\development-appengine\arcfestesmintak;C:\Program Files (x86)\Google\google_appengine\php\sdk') in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 103


    It seems we’ve reached the same point where the initial WP page should display. Yours is blank and mine displays the infamous “Error establishing a database connection”.

    Though this may not prove helpful in your case, my experience is that installing PIL hasn’t changed the results. If you still want to give it a go, Google has instructions here.

    It seems you’ve set up the local database correctly for WP and GAE. I want to ask what parameters you used. I used precisely the ones on the GAE-WP setup page for wp-config:

    /** The name of the database for WordPress */
    define('DB_NAME', '**wordpress_db**');
    /** MySQL database username */
    define('DB_USER', '**wp_user**');
    /** MySQL database password */
    define('DB_PASSWORD', '**wp_password**');

    I’m not sure if the wildcards, “**”, are interfering but altering removing these wildcards in wp_config, I either get confirmation that wp_user logs into MySQL but the database “wordpress_db” cannot be found or vice-versa, the database can be found but the wp_user cannot gain access.

    Can you confirm or print a copy of your block of code in wp_config dealing with these four parameters, if you did not change them to something else?




    Using Google’s parameters indeed results in Error Establishing Database connection.

    Removing the “**” leads me to the blank page. I am using my own database name, username and password as well now. And that leads to blank page too.



    In the error returned at http://localhost:8080/wp-admin/ I see
    Obviously install.php cant be found. It is in /wp-admin/ not in /wp-admin/wp-admin/
    Not sure how to fix that.

    Thanks for responding. It seems that the GAE instructions have some inconsistencies. I got clarified that what I thought were wildcards, “**”, are indeed placeholders for the variables.

    I’m now dealing with the blank screen issue you’re having. I’ve noticed that the command line result of executing the script displays:

    File “C:\google_appengine_1.8.3\google_appengine\google\appengine\api\logservice\”, line 153, in start_request
    host, start_time, method, resource, http_version))
    IntegrityError: RequestLogs.module may not be NULL

    I’ve installed GAE Launcher v1.8.8 but all references to the “IntegrityError” relate to reverting to v1.8.7.

    I’ll report if I resolve the blank screen error. I’ll otherwise have to start from scratch.

    @oc2ps, to resolve the browser blank screen and the command line errors, I downgraded WP to v.3.5.1; the GAE-WP instructions state this is the version used while you have v3.7.1, per your query here.

    Once you do this, go to http://localhost:8080 and NOT http://localhost:8080/wp-admin. GAE will automatically forward your browser to http://localhost:8080/wp-admin/install.php and there the WP installation screen should appear.

    I hope this helps.



    Downgrading WordPress from 3.7.1 to 3.5.1 did make it work.

    On one hand I am glad that it’s working now, on the other hand this sucks! WordPress’ latest version should work on Google Apps Engine. Especially now that WordPress have decided that they will start automatically updating your installation for you!

    Good stuff. I believe the tutorial notes that GAE is just for production, at least for PHP. Admin can upgrade from the local server, install plugins and deploy the app. Admin cannot do either from the production server or, at least, I haven’t been able to.

    (If you’re attempting a migration including content from another production server as I am, you will likely have to set everything up locally and then deploy onto GAE.)

    Last question on the database, and a possible answer to a problem you may run into if you haven’t yet:

    The preset SQL script in Step 6 uses the same parameters as my first post above–wp_user, wordpress_db and wp_password. If you already deployed your v3.5.1 app, were you able to customize these parameters and have the app connect to the database?



    I haven’t deployed yet, but the custom parameters do work for me locally. Will report back once I get a minute to deploy (in a day or two)

    I am tearing my hair out. It works fine for me locally and no errors on deploy. I am using WP 3.5.1 but getting the dreaded “Error establishing a database connection” and I have no idea why. I even used my desktop MySQL workbench to attach to the Google SQL Cloud database and created my user and GRANT ALL renotel, but STILL get the “Error establishing a database connection”. 🙁

    What do I do next?

    OC2PS do let us know how deploy turns out. I’m able to run 3.7.1 locally but I have to remove the ** fore/aft from the DB_NAME, DB_USER, DB_PASSWORD values to work. It’s unclear from you guys above if this is okay (which is why I’m curious to hear if your deploy works).

    Another wrinkle alluded to by Catalyx is importing production data, including hard-coded URLs and paths in the wp_options table. I wonder what these values should be changed to so they work locally and remotely on GAE? My /wp-admin login process naturally throws me to my live production site URL.

    At the least, thanks for this thread guys. It helped move me along.



    The ** are definitely stupid. They are so out of place in a documentation page that seems otherwise well-written.

    I am still far from deployment. As I am not based in the US, herefore I haven’t yet been able to set up my Cloud SQL instance. (returns the error that cloud SQL and app must be in same region…)

    @venturavan: you likely have customized your database name, user or password. GAE doesn’t allow for their alterations. With the exception of removing the asterisks, i.e. “**”, from the MySQL script, there should be nothing else changed.

    This isn’t explained in the tutorial but implicit in further steps as it seems the SQL script to connect the site to the database is fixed and cannot be altered. Why and isn’t this a security risk? Authentication is set locally. The tutorial further explains that Google provides the security.

    @fredhead: yes, the “**” in the instructions must be removed. I migrated my data and deployed with little problem, save the usual broken links and pages here and there in migrations. I didn’t have to individual changes to specific DB tables; I just made global changes to the URLs. If you’re being directed to your live site, check your “hosts” file that you have “ localhost” listed without being commented out.

    Contrary to what I wrote above, you can go directly to http://localhost:8080/wp-admin or http://localhost:8080/wp-admin/install.php after deployment or save the extra keystrokes and just type http://localhost:8080.

    @oc2ps: in the Google Cloud service account, I believe you can select where to have your preferred geographic presence for the site. It seems and the DB may need to be the same.

    I’m new to GAE and hope this helps.


    Separately, GAE is pretty powerful and fast loading once live. The problem I, and it seems others, have had is the speed of the local server. Searching the web for “app engine localhost slow” shows many others have reported this problem with database and page timeouts. This is a problem since all GAE development must be done locally. If someone else successfully deploys, let me know how is your localhost speed. I may start a separate thread for this but thought I’d quickly ask.

    I fixed my database problem. I had my hostname as the instead of localhost. When I changed it to localhost it worked.

    Now facing another issue. Can’t activate plugins even though I just creatd a bucket (the instructions are backwords. We should create Cloud buckets FIRST to be less confusing) and set up a new user with the app email name with permission (OWNER). Still can’t activate plugins because it still asks for FTP user info!!!

    @catalyx Thanks for the extra details. FWIW I’m getting routed to my current URL because I imported my current database which includes the Settings > General values for URLs. So all the links use those values. Today I plan to test with a fresh install then do a db dump after I deploy to see if anything changes with those values, then adjust my current database values and repeat the import and deploy. Worst case, I’ll use a test domain I have, get stuff working, then repoint my domain and adjust the Settings > General values in WP.

    I’m also wondering about SSL. Otherwise, GAE seems like it has really evolved nicely beyond an enterprise or hobby option. Appreciate your help and @oc2ps‘s details.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Trouble running local WordPress in Google App Engine’ is closed to new replies.