Compiling
Article

What I Learned Migrating Websites from Shared Hosting to a VPS

What I Learned Migrating Websites from Shared Hosting to a VPS

Moving a site off shared hosting onto a VPS reads like a copy job: rsync the files, import the database, point the domain. The file copy really is easy. Everything the shared host was doing for you silently is where the time goes.

DNS is a waiting game you have to plan around

Lower the record TTLs a day before you cut over so changes propagate in minutes instead of hours. Keep the old host live and serving until the new one is verified from several networks, not just your laptop. Expect a window where some visitors hit the old box and some hit the new one, and make sure both can talk to the same database or you will lose writes during the overlap.

SSL is now your job

cPanel issued and renewed certificates in the background. On a VPS that becomes a certbot or acme.sh setup plus a renewal timer you actually confirm is running. Test the renewal in dry-run mode before you rely on it, and make sure the web server reloads after a renewal so it picks up the new cert.

Permissions and PHP versions bite immediately

Shared hosting ran your code as your user with a preset PHP build. On a VPS the web server runs as its own user, so upload folders, cache, and log paths need ownership and mode set deliberately. The PHP version is whatever you installed, with only the extensions you added, so a site that worked yesterday can fail on a missing intl or gd until you install it.

The background layer does not migrate itself

Cron jobs from the control panel do not come across; you rebuild them in the system crontab. The scheduler and queue workers need a supervisor to stay alive. If the app uses WebSockets, that is a long-running process with its own port, its own supervision, and a proxy rule in front of it. None of this is hard on its own, but all of it is invisible until the first scheduled email does not send.

The lesson each time: budget the migration around the things the old host hid from you, not around the file copy.

Share
Ankit Verma

Ankit Verma

Software developer at 3EA Limited. I build Laravel and React products, run the infrastructure behind them, and keep releases shipping.

More about me →

Read more posts

More write-ups on deployment, infrastructure, real-time systems, and shipping web products.

All articles