Report this

What is the reason for this report?

How to migrate website from Ubuntu server to another Ubuntu server?

Posted on December 15, 2025

Ubuntu server se new Ubuntu server par migrate karne ka safest method kya hai?



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,

The safest and simplest approach is to use rsync for files and a proper database dump/restore.

Start with this guide: https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories

High level steps:

  1. Use rsync to copy your website files from old server to new server.

  2. Dump the database on the old server (mysqldump or pg_dump) and restore it on the new one.

  3. Update config files (DB credentials, paths).

  4. Test everything using /etc/hosts before switching DNS.

  5. Update DNS once confirmed working.

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.