Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

This guide covers moving an existing self-hosted WordPress site to Hostinger’s Agency hosting plan by copying its files and database, testing the new copy, and then switching web traffic. It is for a manual migration—not a redesign—and assumes you can access the source files, database, and DNS. Hostinger also documents automated migration and backup-upload options; choose one of those if you cannot safely manage the transfer yourself. The goal is a controlled cutover, not a guarantee of zero downtime: DNS caching, site activity, SSL, and server configuration all affect what visitors experience.

If “Agency” means a different hosting provider, the WordPress file, database, and testing steps still apply, but the account setup, database host, file paths, DNS instructions, and SSL steps will differ.

Choose the migration path and identify the risks

Hostinger’s Agency-specific guide describes three routes: automated migration, uploading a backup for Hostinger to restore, or manually uploading and restoring the site. The procedure below follows the manual route, using Hostinger’s documented hPanel flow as the destination-specific part. Menu names can change; check the current Hostinger Agency migration guide if a label differs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Route Best suited to Main trade-off
Manual copy and restore Operators with file, database, and DNS access who want direct control You are responsible for backups, compatibility, cutover, and validation.
Hostinger automated migration A straightforward move where convenience is more important than controlling every transfer step The migration flow may not accommodate every custom server setup; confirm site-specific requirements.
Hostinger backup upload and restore A site that is offline or a verified backup that is already available You still need a complete, usable backup and must validate the restored site.
Migration plugin or professional service Repeatable agency work, limited technical access, or sites where a failed transfer would be costly Compatibility, host limits, and scope still matter; outsourcing does not remove the need for a rollback plan.

A same-domain hosting move normally needs the files and database copied, destination database settings applied, a test, and a web-DNS change. Moving to a different domain or temporary hostname adds URL replacement and redirect work. Multisite networks, WooCommerce, memberships, LMS platforms, external object storage, host-managed caching, and custom server jobs need extra validation. WordPress’s migration guidance covers the general move; it does not make all host-specific configurations portable.

Before you begin: inventory, access, and rollback

Do not begin by updating WordPress, plugins, themes, PHP, or the database. First record the working source environment so that a migration problem is not mixed up with an unrelated upgrade.

Record the source site and dependencies

  • Current domain, WordPress home and site URLs, installation path, and database table prefix.
  • WordPress, PHP, and database versions; required PHP extensions; active theme and child theme; active, inactive, and must-use plugins.
  • Database and uploads sizes, custom files outside the WordPress directory, and any nonstandard upload or object-storage paths.
  • For WooCommerce or membership sites: orders, customers, subscriptions, scheduled actions, registrations, and other data that can change during a copy.
  • Forms, SMTP or transactional email, payment gateways, webhooks, external APIs, CDN, firewall, page/object cache, and IP allowlists.
  • Server cron definitions, `DISABLE_WP_CRON`, redirects, analytics, Search Console verification, and other server-specific rules.

If shell access and WP-CLI are available, these commands collect useful details from the source WordPress directory:

wp core version
wp plugin list
wp theme list
wp option get home
wp option get siteurl
wp db prefix
wp db size

Preserve DNS and email information

Save the existing DNS zone or record list before making changes. Note the root-domain and `www` A, AAAA, or CNAME records, plus MX, TXT, SPF, DKIM, and DMARC records. Confirm whether email is hosted separately from the website. A hosting move does not automatically migrate mailboxes, and replacing an entire DNS zone with a basic web-hosting template can break email and third-party services.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make a rollback plan

Keep two independent copies of the backup, including one outside the old hosting account. Keep the source site and account available until the destination passes testing, a new destination backup has completed, the client has approved the result, and the agreed rollback window has ended. If the site accepts orders, registrations, comments, or other writes, plan a short final freeze and database copy immediately before cutover; an earlier database export will not include later changes.

Step 1: back up the complete site

A WordPress database export alone is not a complete site backup. It contains content and settings, but not themes, plugins, uploads, or `wp-config.php`. The WordPress documentation explains this distinction in its database backup guidance.

Export and check the database

From the source installation directory, use WP-CLI if available:

wp db check
wp db export source-backup.sql

Keep the export private: it can contain personal information, account details, and site configuration. If WP-CLI is unavailable, export the source database through the host’s database tool, such as phpMyAdmin. Save the database name, user, host, and prefix separately. WP-CLI documents its database commands.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Copy files and configuration

For the most faithful clone, copy the full WordPress installation, including hidden files such as `.htaccess` when present, `wp-content`, core files, and custom files outside the standard directories. Keep `wp-config.php` secure and review it before using it at the destination; its database credentials and potentially host-specific settings must not be copied blindly.

A compressed archive can simplify transfer. Adjust cache exclusions to the site’s actual cache locations; do not exclude uploads, custom themes, plugins, or must-use plugins.

tar -czf wordpress-files.tar.gz 
  --exclude='wp-content/cache' 
  --exclude='wp-content/uploads/cache' 
  /path/to/wordpress

Transfer by SFTP, SCP, or the hosting file manager. With shell access, an example SCP transfer is:

scp wordpress-files.tar.gz user@destination-server:/path/to/destination/

Then extract it in the intended destination directory:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
tar -xzf wordpress-files.tar.gz

Hostinger’s documented manual workflow specifically uses a compressed source `wp-content` directory rather than requiring a complete root-directory replacement. That can work when the destination core is compatible, no required custom files sit elsewhere, and you retain and correctly configure the destination `wp-config.php`. It is not the same as copying a complete installation. Hostinger’s steps are in its Agency migration instructions.

Step 2: create the destination WordPress site

  1. In Hostinger hPanel, open Websites, select Add Website, choose WordPress, then select Create New Website.
  2. Enter the site credentials and select a WordPress version compatible with the source. Do not treat a version shown in an instructional screenshot as a permanent requirement; record the source version and check compatibility.
  3. Use the real domain if it is ready for controlled testing, or a temporary domain/preview route. Do not point public DNS at the new site before it is tested.
  4. Open the destination File Manager or connect by SFTP/SSH. Confirm the destination directory and database details before replacing files or tables.

Hostinger’s current documented flow uses those hPanel labels, but the interface may change. Its guide also describes creating the installation before replacing `wp-content` and restoring the database.

Step 3: transfer the files to Hostinger

Upload the archive or copied files to the correct destination directory. If following Hostinger’s `wp-content` method, preserve the source copy until the destination version is confirmed. Replacing files is destructive: check the path twice before removing or overwriting anything.

  • Ensure `wp-content/uploads/` is present and complete.
  • Preserve active and child themes, plugins, and `mu-plugins` where used.
  • Review `.htaccess` and custom root files rather than assuming they transfer or behave identically on the destination server.
  • Do not copy cache contents as if they were site data; cache directories can generally be regenerated, but confirm the exclusions suit this site.
  • Check file ownership and permissions using Hostinger’s supported controls; permissions that were valid on the source may not suit the destination.

Step 4: import the source database

The import replaces the fresh destination installation’s database tables with the source site’s data. Confirm you have selected the intended destination database and saved any needed destination information first.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Using Hostinger’s phpMyAdmin route

  1. In hPanel, go to Databases → Management → Enter phpMyAdmin.
  2. Select the destination database and verify it is the one connected to the new WordPress installation.
  3. Remove the fresh-installation tables only after confirming they contain no data you need. Importing the source database overwrites the destination’s WordPress content and settings.
  4. Import the source SQL export, then confirm that the WordPress tables are present and that their prefix is known.

Hostinger’s guide describes dropping the new installation’s tables and importing the old database. Do not apply that instruction to the wrong database.

Using WP-CLI

If shell access and WP-CLI are available, place the SQL file where the destination can read it and run the command from the destination WordPress directory:

wp db import source-backup.sql
wp db check

Large imports may be more practical through a command line than a browser upload, but this depends on shell access, database limits, and the host’s configuration. WP-CLI must be run against the intended site and configuration; use its global `–path` or other options if needed.

Step 5: configure `wp-config.php`

The destination configuration must use the destination database credentials, not the source values. The actual database host is supplied by the host; do not assume it is `localhost`.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
define( 'DB_NAME', 'destination_database_name' );
define( 'DB_USER', 'destination_database_user' );
define( 'DB_PASSWORD', 'destination_database_password' );
define( 'DB_HOST', 'host_value_supplied_by_provider' );

Match `$table_prefix` to the imported tables. If the database has tables such as `abc_posts` and `abc_options`, use the `abc_` prefix:

$table_prefix = 'abc_';

A mismatch commonly makes WordPress behave as if the site or tables do not exist. Keep database passwords out of public files, support tickets, and screenshots.

Host and site URL constants such as `WP_HOME` and `WP_SITEURL` can override values stored in the database:

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

Add or change these only when you intentionally need an override. If they are already defined in `wp-config.php`, they may prevent database URL changes from taking effect.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 6: handle URLs without corrupting WordPress data

If the domain and scheme are unchanged, do not perform a broad replacement automatically. Check the `home` and `siteurl` values and test first. If you are using a temporary domain, update those options for the staging test, then replace the temporary address with the final address during cutover.

wp option update home 'https://staging.example.com'
wp option update siteurl 'https://staging.example.com'

When a hostname, scheme (`http`/`https`), `www` choice, or subdirectory changes, use WP-CLI’s serialization-aware `search-replace`. Raw SQL `REPLACE()` can corrupt PHP-serialized values used by options, widgets, and plugins. Run a dry run first, review the count and scope, and keep a fresh database backup before applying the live replacement.

wp search-replace 
  'https://staging.example.com' 
  'https://example.com' 
  --all-tables-with-prefix 
  --recurse-objects 
  --skip-columns=guid 
  --dry-run

If the dry run is correct, repeat without `–dry-run`:

wp search-replace 
  'https://staging.example.com' 
  'https://example.com' 
  --all-tables-with-prefix 
  --recurse-objects 
  --skip-columns=guid

Use the exact old and new address, including scheme and any path. For an HTTP-to-HTTPS correction on the same hostname, for example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp search-replace 
  'http://example.com' 
  'https://example.com' 
  --all-tables-with-prefix 
  --recurse-objects 
  --skip-columns=guid 
  --dry-run

WP-CLI documents serialized-data handling, `–dry-run`, `–all-tables-with-prefix`, `–recurse-objects`, and `–skip-columns` in its search-replace reference. The `guid` column is normally excluded from a routine domain migration. Custom plugin tables may need separate attention if they do not share the WordPress prefix.

For multisite, use a network-aware process and validate mapped domains, subdomain or subdirectory structure, and custom tables separately. `–network` is available, but a single command is not proof that every network configuration has been migrated correctly:

wp search-replace 
  'https://old.example' 
  'https://new.example' 
  --network 
  --all-tables-with-prefix 
  --recurse-objects 
  --skip-columns=guid 
  --dry-run

Follow WordPress’s separate migration guidance for network-specific considerations.

Step 7: test the destination before changing DNS

Test through the temporary domain, preview URL, or a private hosts-file override. A test through the temporary hostname can expose URL and cookie issues; where possible, verify the destination using the real hostname before public traffic is switched.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Content and media: Open the homepage, several interior pages, posts, taxonomies, custom post types, menus, search, images, responsive image sizes, and upload a test file.
  • Access: Test login, logout, password reset, user roles, and admin screens.
  • Forms and email: Submit forms and verify delivery, SMTP settings, transactional email, and any third-party API connection.
  • Commerce and membership: Check cart, checkout, payment callbacks, account pages, orders, coupons, taxes, shipping, confirmation emails, subscriptions, renewals, and scheduled actions. Use a safe test mode where available.
  • SEO and routing: Check canonical URLs, `robots.txt`, XML sitemaps, search-engine visibility, redirects, and representative old URLs.
  • Runtime: Review PHP/server logs, database errors, browser console, HTTPS and mixed-content warnings, cache behavior, cron, and external integrations.

Do not test only the front page. Admin login, checkout, email, scheduled jobs, and media paths can fail even when the homepage appears normal.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Step 8: freeze writes, take the final copy, and cut over

For a quiet brochure site, a short maintenance window may be enough. For an active store, membership site, or publishing site, a maintenance banner alone may not stop all writes. Coordinate a window, pause or restrict changes, and take the final database export after the write freeze. Copy any files changed since the initial transfer, import the final database, and verify the destination again before changing DNS.

WP-CLI can enable and disable WordPress maintenance mode:

wp maintenance-mode activate
# Perform the final copy and cutover
wp maintenance-mode deactivate

Do not enable maintenance mode long before the final transfer; it extends disruption and does not stop external payment or CRM webhooks. WP-CLI documents the maintenance-mode commands.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 9: change web DNS while preserving email

  • Check the destination SSL certificate and HTTPS behavior before routing public traffic where possible.
  • Change only the records needed to route website traffic to the destination, including the appropriate root and `www` records.
  • Preserve MX and email-related TXT records for SPF, DKIM, and DMARC, as well as unrelated verification and third-party records.
  • If your DNS provider allows it, lower the relevant record TTL in advance; this can reduce some caching delay but does not make every resolver switch immediately.
  • If Cloudflare or another proxy/CDN is in use, verify its origin address, SSL mode, cache rules, and firewall behavior as well as the DNS record.

DNS resolvers and clients may continue using the old address until cached records expire. Keep the old site available during the transition, and avoid accepting new writes on both copies after the final database import.

Step 10: verify after the switch

After the destination is serving the real domain, clear or regenerate WordPress rules and cache if needed:

wp rewrite flush
wp cache flush

WP-CLI documents these in its command reference. Then check HTTPS redirects and certificates, pages and media, permalinks, forms and email, login, commerce callbacks, cron and scheduled actions, redirects and 404s, analytics, CDN behavior, mobile rendering, and server logs. Confirm that the new host’s backup job has completed successfully.

Troubleshooting common migration failures

“Error establishing a database connection”

  • Check `DB_NAME`, `DB_USER`, `DB_PASSWORD`, and the exact `DB_HOST` supplied for the destination.
  • Confirm the database exists, the user has privileges, the import completed, and `$table_prefix` matches the imported table names.

White screen or HTTP 500

Check PHP and server logs first. Common causes include a PHP version or extension mismatch, incompatible plugin/theme code, incomplete transfer, permissions, or incorrect database settings. If WP-CLI can bootstrap, deactivate plugins and switch only to a default theme that is actually installed:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp plugin deactivate --all
wp theme activate twentytwentyfive

If WP-CLI cannot load the site, temporarily rename the suspected plugin directory through SFTP or File Manager and inspect the server logs.

Broken images or styling

Confirm the uploads directory was copied, file paths and permissions are correct, the database URLs match the test hostname, and CDN or object-storage URLs remain valid. Check for HTTPS mixed content and old URLs in plugin data.

Login fails

Check the imported database and prefix, URL/cookie domain, security plugins, and object cache. Do not routinely change WordPress security salts: changing them invalidates existing sessions and signs users out.

Interior pages return 404

Run `wp rewrite flush`, then verify the server’s rewrite configuration and `.htaccess` or equivalent. WordPress notes that rewrite configuration may need attention after a move in its migration guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Forms, email, or scheduled tasks stop working

For email, check SMTP, provider restrictions, sender alignment, SPF/DKIM/DMARC, plugin settings, and API keys. For scheduled work, check WP-Cron, `DISABLE_WP_CRON`, host-level cron commands and paths, PHP CLI version, external cron services, and WooCommerce Action Scheduler.

Old host still receives visits

This can happen while DNS caches expire. Keep the old host online and monitor both sides; the source should not accept writes that will be absent from the final destination database.

New orders or registrations are missing

The final database copy was likely made before the last source writes. Restore from the correct final backup or reconcile the missing records with care; do not simply overwrite a live destination database without accounting for destination-side writes.

When a manual migration is not the right choice

Use Hostinger’s assisted route, a migration plugin, or a specialist when you cannot verify a restore, the database is too large for the available import method, the site is a revenue-critical store, the network is multisite, the source is compromised or unstable, or custom server dependencies are undocumented. The key is not whether a tool is “safer” in general: the practical choice depends on access, site complexity, a tested staging copy, and a workable rollback plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.