[WIP] Migrating from Digital Ocean to Servd
Migrating your website hosting from DigitalOcean (managed via Laravel Forge) to Servd involves several steps to ensure a smooth transition. Below is a step-by-step guide to help you through the process:
Preparation
- Backup Your Site: Before making any changes, ensure you have a full backup of your website, including the database and files. Enable automated backups in DigitalOcean to regularly capture snapshots of your Droplet. Additionally, you can create manual backups through Forge or by exporting your database and files manually to ensure you have an up-to-date copy.”
Set Up Servd
- Create a New Project on Servd: Log in to your Servd account and create a new project. This will typically involve choosing a plan and setting up the basic configurations.
- Add Environment Variables: Servd allows you to add environment variables through their dashboard. Ensure that all necessary environment variables from the Forge-managed site are added to Servd.
Migrate the Database
Create a Database Backup Using Craft CMS GUI:
- Access the Craft Control Panel: Log in to the Craft CMS control panel on your current DigitalOcean-hosted site.
- Navigate to the Database Backup Section:
- Go to Utilities > Database Backup.
- Create the Backup:
- Click on Backup Database. Craft will generate a backup of your database and store it in the storage/backups directory on your server.
- After the backup is complete, navigate to the storage/backups directory via SFTP or your server’s file manager.
- Download the backup file (usually a .sql or .zip file) to your local machine.
Import the Database Using Servd GUI:
- Access the Servd Dashboard: Log in to your Servd account and navigate to the project where you want to import the database.
- In the Servd dashboard, find the environment (Production or Staging) where you want to upload the database to and click on the Import link.
- Upload the database backup file you downloaded from Craft. Servd will handle the import process.