Migrate from SiteGround to fortrabbit
Published
Updated
🌐
From SiteGround to fortrabbit.
How to move a WordPress, Laravel, Craft CMS or other PHP site from SiteGround to a fortrabbit app. The code moves into Git, the database as a dump, the uploads with rsync, and the mailboxes stay with a mail provider.
Migrate from SiteGround with a coding agent
Claude Code, Codex, Cursor and other coding agents can run this migration. Paste this prompt into the agent, in the project folder:
Read https://www.fortrabbit.com/agents.md and set up fortrabbit. Then move this site from SiteGround to fortrabbit, following https://www.fortrabbit.com/raw/migrate/from-siteground.md
Sign-in happens in the browser, see agent setup. The agent needs SSH access to the SiteGround site to download the files and dump the database. The steps below are what the agent follows, and what to do by hand without one. The agent changes nothing on the old host: a person deletes the old setup once the site runs on fortrabbit.
SiteGround features and where they go
| In SiteGround Site Tools | On fortrabbit |
|---|---|
/home/customer/www/<domain>/public_html | Git repository, deployed by the GitHub integration |
.env, wp-config.php or other config files | Environment variables |
| Devs → Cron Jobs | Cron jobs |
| Site → MySQL → phpMyAdmin | MySQL component |
Uploads in public_html | Storage component, files copied with rsync |
| Email → Accounts | Stays with a mail provider |
| DNS Zone Editor | DNS at the domain provider |
1. Create the app
Create an app in the dashboard with the software template matching the CMS or framework. Its default domain works with HTTPS right away, so the whole move can be tested before DNS changes. Lower the TTL of the domain's DNS records now, see migrate to fortrabbit.
2. Download the files
Add an SSH key under Devs → SSH Keys Manager in Site Tools. SiteGround allows key-based SSH only, on port 18765:
ssh -p 18765 <user>@<host>
Pull the site to the local machine with rsync over the same port:
rsync -avz -e "ssh -p 18765" <user>@<host>:www/<domain>/public_html/ ./site/
See download a website. The site lives in /home/customer/www/<domain>/public_html.
3. Put the code into Git
Create a repository from the downloaded files and leave out the uploads, vendor and the config file with the credentials. Push it to GitHub. The install guide for the CMS or framework in the fortrabbit docs names the settings that move into environment variables.
4. Copy the settings
- Open the config file, such as
.envorwp-config.php. Copy every value except the database credentials and the site URL into the environment variables of the fortrabbit environment. - Open Devs → Cron Jobs. Each entry becomes one cron job. Paths under
/home/customer/wwwchange, see the directory structure. - Remove plugins tied to SiteGround, such as SiteGround Optimizer and SiteGround Security for WordPress, from the repository, not from the live site.
5. Deploy the code
Connect the repository to the environment and push. Composer runs in the build commands.
6. Move the database
Export the database in phpMyAdmin, under Site → MySQL. For databases over 50 MiB, SiteGround recommends mysqldump over SSH:
mysqldump -u <user> -p <database> > dump.sql
Import the dump into the MySQL component as described under MySQL export and import.
7. Copy the uploads
Push the upload folder, such as wp-content/uploads, to the environment with rsync.
8. Keep the mail
SiteGround mailboxes sit under Email → Accounts, and fortrabbit has none. Move them to a mail provider before the DNS switch, or keep the MX records pointing to SiteGround while the plan runs. Use SMTP or a transactional mail provider for mail the app sends, since PHP mail() does not work on fortrabbit, see limits.
9. Switch the DNS
When the domain uses the SiteGround nameservers ns1.siteground.net and ns2.siteground.net, its records are in the DNS Zone Editor. Moving DNS to the registrar or a DNS provider first keeps the domain working after the plan ends. Test the app on its default domain, add the custom domain to the environment and point the records to fortrabbit, see external domain setup.
Cancel the SiteGround plan once the site, the mail and the DNS run without it.