Reputation: 13
This one last shot before I delete my WordPress deployment installation on the Google Cloud Engine and start from scratch.
My WordPress site was working fine when first deployed about two months back. I then stopped the instance, as I didn't have time to work on it and didn't want to incur charges.
When it came to starting it last night, it seemingly starts ok, as per Google Developers console report, but the front end is everything, but ok. It is timing out, all I get is the index page (after a long time), but without any css and I can't get onto any other pages.
I can connect to the server using ssh command, I can even see the files via SFTP and I can't see anything obvious in phpmyadmin.
Does anybody have any pointers? What other info do you need? Sadly the documentation on Cloud Engine Wordpress deployment is very thin to offer much guidance beyond one click deployment.
Many thanks for any help.
ZONE
asia-east1-a
MACHINE TYPE
g1-small
IMAGE
wordpress-debian-7-wheezy-v20150127
WORDPRESS VERSION
4.1
HTTP traffic is allowed.
Update 26/03/2015:
As @Paolo P pointed out the problem was in the Google Compute Engine assigning an ephemeral address, which was replaced by a new one once the instance was restarted. To fix the issue I did:
wp_options
> edit siteurl
and home
with the new url.edit wp-config.php
> add (swap example.com for your new url):
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
at this stage your front end will be still unavailable, next
login to /wp-admin
, which seems to update some settings in the background and voila, your front end is available at the new address.
comment out/delete the above code from wp-config.php
once your site is back up and running again. If you don't, you won't have the ability to change the site urls within the WordPress content management end.
Some further info on changing site url is here. Note, I didn't have to touch functions.php
to make it work https://codex.wordpress.org/Changing_The_Site_URL
Upvotes: 0
Views: 4770
Reputation: 886
If your instance had an ephemeral IP it could be changed after stopping it as documented here. After boot Wordpress internal configuration is still referring to a different IP and hence is not finding CSS and other page components.
Assign a static IP to instance and change WP configuration files accordingly. Note that some configurations may need to be updated inside DB data too.
Regards,
Paolo
Upvotes: 2