Report this

What is the reason for this report?

Website redirecting to another site on same droplet after moving droplets

Posted on September 8, 2025

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.