Migrate from Hostinger to fortrabbit
Published
Updated
🌐
From Hostinger to fortrabbit.
How to move a WordPress, Laravel or other PHP site from Hostinger web or cloud hosting 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 Hostinger 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 Hostinger to fortrabbit, following https://www.fortrabbit.com/raw/migrate/from-hostinger.md
Sign-in happens in the browser, see agent setup. The agent needs SSH access to the Hostinger plan 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.
Hostinger features and where they go
| In hPanel | On fortrabbit |
|---|---|
public_html of the website | Git repository, deployed by the GitHub integration |
| Advanced → Git | GitHub integration with build commands |
.env, wp-config.php or other config files | Environment variables |
| Cron Jobs | Cron jobs |
| Databases → phpMyAdmin | MySQL component |
Uploads in public_html | Storage component, files copied with rsync |
| Hostinger Email | 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
Switch on SSH under SSH Access in hPanel and note the username, host and port shown there. The Single plan has no SSH. Pull the site with rsync, see download a website. The exact path of public_html is listed under the FTP accounts of the website.
3. Put the code into Git
A site deployed with Hostinger's Git feature already has a repository: connect the same one to fortrabbit. Otherwise create a repository from the downloaded files, leave out the uploads, vendor and the config file with the credentials, and push it to GitHub. Hostinger's Git deploy runs no build step; on fortrabbit, Composer and npm run in the build commands.
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 Cron Jobs in hPanel. Each entry becomes one cron job. Hostinger runs them in UTC.
5. Deploy the code
Connect the repository to the environment and push. The first deployment runs the build commands.
6. Move the database
Open Databases → Management, enter phpMyAdmin and export the database. With SSH, mysqldump works too. 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
Hostinger Email sets its records when the domain uses the Hostinger nameservers. Move the mailboxes to a mail provider before the DNS switch, or keep the MX records pointing to Hostinger. 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 ns1.dns-parking.com and ns2.dns-parking.com, its records are in the Hostinger 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 Hostinger plan once the site, the mail and the DNS run without it.