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
txt

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 ToolsOn fortrabbit
/home/customer/www/<domain>/public_htmlGit repository, deployed by the GitHub integration
.env, wp-config.php or other config filesEnvironment variables
Devs → Cron JobsCron jobs
Site → MySQL → phpMyAdminMySQL component
Uploads in public_htmlStorage component, files copied with rsync
Email → AccountsStays with a mail provider
DNS Zone EditorDNS 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>
shell

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/
shell

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 .env or wp-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/www change, 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
shell

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.