Cloned Staging Site to New Droplet and Now it Won't Load - Why?

December 21, 2018 672 views
Applications DigitalOcean DNS WordPress

I had a Wordpress staging site set up and it was working perfectly. I took a snapshot and pushed it to a new Wordpress 18.04 droplet with the same exact configuration as the staging site. I SSH'd in to complete the WP install on the new droplet, but it won't load the site. I just get a PHP page with tons of text on it. Anyone know what's up? I have nameservers (3) pointed to DO. I created an A record to point to the IP of the new droplet. I'm not sure what gives. I've been at this for hours.

Staging: staging.explorecarbon.com

Production: 104.248.125.9 (explorecarbon.com)

2 Answers

Hey, I don't see PHPspew on your prod IP or the domain root url, I see a basic Wordpress site. Is that new since posting above?

I'm wondering what WP tool you're using to snapshot your staging site. What about a Droplet snapshot of your staging, restored onto a larger production Droplet, could that work for your intended workflow?

  • Hi -

    Yes, the basic WP site is new. Not sure why it went from the PHP spew to that, but either way, it's not the result i'm looking for :)

    As you said, "What about a Droplet snapshot of your staging, restored onto a larger production Droplet, could that work for your intended workflow?." That's what I thought I had done. I went into staging, created a droplet snapshot, then pushed that snapshot to a new WP 18.04 droplet. Maybe I'm missing something where I thought the files would automatically render. I'm trying to cover for our guys who are out on vacation, but I'm not as smart as they are. Is there some sort of WP directory file that I might need to point from the basic site to the snapshot files?

then pushed that snapshot to a new WP 18.04 droplet.

With simple Droplets, all you need to do with a snapshot is Create Droplet from it. You can do the same with Wordpress but a few configs need to be updated after the restore onto a new IP / host / url. To clarify, theres' no need to create a WP 18.04 and then restore, the snapshot is a full restore. Assuming that's what you meant, then the config to be updated for Wordpress moving to a new IP address and new host is found in the wordpress db in the wp_options table. Those must be updated.

Following this article I've done that to one Wordpress Droplet recently, using these steps; https://stackoverflow.com/questions/535534/wordpress-host-ip-changed

–Get the root mysql password

more /etc/apache2/sites-enabled/000-default.conf .digitalocean_password 

–Connect to the database

mysql -u root -p 
<enter the password from above>

change to the wordpress db

use wordpress

–Check the wpoptions for siteurl and home

mysql> Select * from wp_options where option_name IN('siteurl','home'); 

–Update those to my new values

update wp_options set option_value='http://example.com' where option_name = 'siteurl';
update wp_options set option_value='http://example.com' where option_name = 'home';

–Restart the Droplet, wait a few minutes for it to come up, and the site should be up and running on your new host.

Good luck!

Have another answer? Share your knowledge.