By orbitstorm88
I currently have two droplets. One (D1) is super outdated and would require far too much effort to bring current. My other droplet (D2) is hosting a fantasy football page that I created a few weeks ago. I decided to take the websites on D1 and move them to D2 with the intention of upscaling D2 to support them.
Thus far I’ve moved the contents of /var/www/ and downloaded copies of my SQL databases. I’ve also downloaded copies of the hosts files found in /etc/apache2/sites-available and then manually enabled them via command line. I’ve also updated my DNS records on DigitalOcean as well as CloudFlare to point to the new droplet.
I’ve only tested one site so far (it’s a WordPress site) but it’s currently redirecting to the WordPress installation that was already on the D2 droplet. I’m not really sure what I’m missing. The .htaccess files appear to be fine.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Did you also change your domain name when you moved the site? If this is the case in most cases this happens because WordPress stores the domain in the database. Check the siteurl
and home
values in the wp_options
table for the site you just moved, if they don’t match your domain, WP will redirect you.
Also double-check your Apache vhost configs to make sure each site points to the right /var/www/...
path.
If it still keeps redirecting, tail the Apache error log while you test:
tail -f /var/log/apache2/error.log
Feel free to share the errors here.
It could be that the /var/www/your-site
directory has the wrong owner. Apache usually runs as the www-data
user, so you’ll want that user (and group) to own the files. You can check with:
ls -la /var/www/your-site
Heya, @orbitstorm88
If you also changed the domain name for the installation, you can check this question here, as you’ll need to update a few settings within WordPress itself.
https://www.digitalocean.com/community/questions/switch-the-domain-of-my-wordpress-droplet
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.