The Wild

How to Migrate WordPress to Hostinger (Step-by-Step)

· 6 min read · Mammals

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Migrating a WordPress site to Hostinger means moving all your files, database, and settings from your current host to Hostinger's servers. This guide walks you through the entire process, whether you're moving from a shared host, a VPS, or another managed WordPress provider. By the end, your site will be fully functional on Hostinger with minimal downtime.

What You'll Need

  • Access to your current hosting account (cPanel, Plesk, or custom panel) with FTP/SFTP credentials or a file manager.
  • Your WordPress admin login credentials.
  • A Hostinger account with an active hosting plan (shared, cloud, or WordPress-specific).
  • Your domain name (either registered with Hostinger or you'll update DNS later).
  • A backup plugin (like UpdraftPlus or Duplicator) or manual backup method.
  • Patience and about 30-60 minutes of uninterrupted time.

Step-by-Step

1. Back Up Your Current WordPress Site

Before touching anything, create a full backup. The easiest way is to use a backup plugin like UpdraftPlus:

  1. Install and activate UpdraftPlus on your current site.
  2. Go to Settings > UpdraftPlus Backups and click Backup Now.
  3. Choose to include the database and files, then download the backup files to your computer.

If you prefer a manual backup, use cPanel's Backup tool or download the wp-content folder via FTP and export your database via phpMyAdmin.

2. Set Up Your Hostinger Account and Hosting Plan

If you don't already have a Hostinger account, sign up and purchase a hosting plan that suits your needs. Once done, log in to your Hostinger hPanel.

3. Create a New Database on Hostinger

Your WordPress site needs a fresh database on Hostinger:

  1. In hPanel, go to Databases > MySQL Databases.
  2. Create a new database, a database user, and assign the user to the database with all privileges.
  3. Note the database name, username, and password – you'll need them later.

4. Upload Your WordPress Files to Hostinger

You have two options: use the File Manager or FTP.

  • File Manager: In hPanel, go to Files > File Manager, navigate to public_html, and upload your WordPress files (from the backup or a fresh download).
  • FTP: Connect using an FTP client like FileZilla with the FTP credentials from Hostinger (found under Files > FTP Accounts). Upload all files to public_html.

If you used a backup plugin, extract the backup files into public_html after uploading.

5. Import Your Database to Hostinger

  1. Go to Databases > phpMyAdmin in hPanel.
  2. Select the database you created in step 3.
  3. Click the Import tab, choose your database backup file (usually a .sql file), and click Go.

6. Update wp-config.php with New Database Details

Locate the wp-config.php file in your WordPress root directory (either via File Manager or FTP). Edit it and replace the database name, username, and password with the ones you created on Hostinger. Also update the DB_HOST if needed (usually stays as localhost).

7. Point Your Domain to Hostinger

If your domain is registered elsewhere, update its nameservers to Hostinger's (find them in your Hostinger account under Domains > Domain Portfolio). If your domain is already with Hostinger, it will be automatically connected.

DNS propagation can take up to 24 hours, but often it's much faster.

8. Test Your Site

Once DNS has propagated, visit your domain. You should see your WordPress site. Log in to wp-admin using your original credentials. If you see a database connection error, double-check your wp-config.php settings.

9. Update Permalinks and Settings

Go to Settings > Permalinks in your WordPress dashboard and click Save Changes to refresh the rewrite rules. This prevents 404 errors on your pages.

10. Final Checks

  • Test all pages, posts, and forms.
  • Check that images and media load.
  • Verify that any custom domains or subdomains are working.
  • If you use SSL, enable Hostinger's free SSL certificate via hPanel (AutoSSL or Let's Encrypt) and update your site URL to HTTPS.

Common Mistakes

  • Forgetting to update wp-config.php – This is the #1 cause of database connection errors after migration.
  • Uploading files to the wrong directory – Make sure files go into public_html, not a subfolder unless you intend to run WordPress from a subdirectory.
  • Not importing the database correctly – Ensure you import into the correct database and that the import completes without errors.
  • Ignoring file permissions – Set directory permissions to 755 and file permissions to 644 to avoid security issues.
  • Skipping the permalink refresh – This causes broken links and 404 errors.
  • Not checking for mixed content – If your site was HTTP and you switch to HTTPS, some images/scripts may still reference HTTP. Use a plugin like Better Search Replace to update URLs.

Tips

  • Use a migration plugin like Duplicator or All-in-One WP Migration to automate the process – they handle URL replacements and database updates for you.
  • Before switching DNS, test your site on Hostinger by editing your local hosts file or using a temporary URL provided by Hostinger (often yourdomain.hostinger-site.com).
  • Keep your old hosting active for at least a week after migration to ensure everything is working and to retrieve any missing files.
  • Enable caching and a CDN after migration to improve performance.
  • Make a fresh backup of your site once it's live on Hostinger.

Troubleshooting

Database Connection Error

Check your wp-config.php file – database name, username, password, and host must be correct. Also verify that the database exists and the user has all privileges.

404 Errors on Pages/Posts

Go to Settings > Permalinks and click Save Changes. If that doesn't work, ensure your .htaccess file exists and is writable.

White Screen of Death

Enable WordPress debugging by adding define('WP_DEBUG', true); to wp-config.php to see the error. Common causes: PHP version incompatibility or missing files. Check the error log in hPanel.

Site Shows Old Host's Content

Your DNS may not have propagated yet. Clear your browser cache and try a different device or network. Wait up to 24 hours.

Images Broken

Use a plugin like Better Search Replace to update the old domain URL to the new one in the database. Also check that the wp-content/uploads folder was fully uploaded.

Can't Log In to wp-admin

If you get redirected to the old site, your database still has the old domain. Update the siteurl and home options in the wp_options table via phpMyAdmin. Alternatively, use a migration plugin to update URLs.

Frequently Asked Questions

Do I need to buy a new domain for Hostinger?

No, you can use your existing domain. Just update the nameservers to Hostinger's.

Will my site experience downtime during migration?

If you do a manual migration, there may be a short downtime while DNS propagates. Using a staging environment or a migration plugin can minimize it.

Can I migrate from WordPress.com to Hostinger?

Yes, but you'll need to export your content from WordPress.com (Tools > Export) and import it into a fresh WordPress installation on Hostinger. Plugins and themes may need to be reinstalled.

How long does the migration take?

Typically 30 minutes to a few hours, depending on the size of your site and your technical comfort. DNS propagation can take up to 24 hours.

Is Hostinger's free SSL certificate enough?

Yes, Hostinger offers free SSL via Let's Encrypt, which is sufficient for most sites. You can enable it in hPanel under Security > SSL.

What if I have a large site (over 1GB)?

Use a migration plugin that supports large sites, or upload files via FTP in batches. Also, increase your PHP memory limit temporarily if needed.