Knowledgebase

How to migrate a WordPress site to new hosting (manually, All-in-One WP Migration or Duplicator)

Moving your site to EgWeb or to a new hosting account does not have to mean downtime. This guide shows you three ways to migrate a WordPress site to new hosting: with the All-in-One WP Migration plugin, with Duplicator, or manually with File Manager and phpMyAdmin. Pick the method that fits your site size and comfort level, then follow the final checklist so visitors never notice the move.

Before you start

  • Take a full backup of the old site and keep it until the new one has run smoothly for a few days.
  • Do not change your domain's DNS or nameservers yet. Move and test first, switch DNS last.
  • Check the PHP version on the old host and choose the same or a newer supported version on the new one.
  • Pause changes on the old site during the move (new posts, orders), or plan to move again at the end. For a busy WooCommerce store, choose a quiet time.
If your old host also uses cPanel, a full cPanel account backup can often be restored as-is, including email. Open a ticket and ask our team whether this option fits your case.

Method 1: All-in-One WP Migration (easiest for small sites)

  1. On the old site, install All-in-One WP Migration from Plugins → Add New.
  2. Go to All-in-One WP Migration → Export → Export To → File, and download the .wpress file.
  3. On the new hosting, install a fresh WordPress (see How to install WordPress) and install the same plugin.
  4. Go to Import and upload the .wpress file. Confirm that it will overwrite the new site.
  5. Log in again with your old site's username and password, then go to Settings → Permalinks and click Save Changes twice.

The free version limits the size of the file it can import. If your export is bigger, use Duplicator or the manual method.

Method 2: Duplicator

  1. On the old site, install Duplicator and create a new package (called a backup in newer versions). Run the scan and build it.
  2. Download both files: the archive (.zip or .daf) and installer.php.
  3. On the new hosting, create an empty database and user. See How to Create a MySQL Database and User in cPanel.
  4. Upload both files to the empty site folder (for example public_html) with File Manager or FTP.
  5. Open https://yourdomain.com/installer.php (or use a temporary address while DNS still points to the old host), enter the database details and follow the steps.
  6. When finished, log in and let Duplicator delete the installer files. Leaving installer.php on the server is a security risk.

Method 3: Manual migration (any size)

  1. Files: on the old host, compress the WordPress folder into a ZIP and download it.
  2. Database: open phpMyAdmin, select the database, click Export, choose Quick and format SQL, and download the file.
  3. On the new hosting, upload the ZIP to public_html with File Manager and Extract it.
  4. Create a new database and user, then open phpMyAdmin, select the new database and use Import to load the SQL file.
  5. Edit wp-config.php and update the database details:
define( 'DB_NAME', 'newcpaneluser_dbname' );
define( 'DB_USER', 'newcpaneluser_dbuser' );
define( 'DB_PASSWORD', 'the-new-password' );
define( 'DB_HOST', 'localhost' );

If the domain is changing too, update the URLs safely as explained in How to change the WordPress site URL and move from HTTP to HTTPS in the database.

Test before you switch DNS

You can preview the new copy before the world sees it by editing the hosts file on your own computer to point your domain to the new server's IP address. Test the home page, a few posts, the login, forms and, for a store, a full checkout. Remove the line from your hosts file afterwards.

Switch DNS and finish

  1. Point the domain to the new hosting. See How to point your domain to your hosting.
  2. Issue the SSL certificate on the new server once DNS has updated (AutoSSL runs automatically on EgWeb hosting).
  3. Keep the old hosting active for a few days while DNS updates around the world, then cancel it.
  4. Recreate email accounts on the new hosting if your email was on the old server, and move messages if needed.

Common problems

  • "Error establishing a database connection": a wrong database name, user or password in wp-config.php, or the user was not added to the database with all privileges.
  • Home page works, other pages give 404: re-save Settings → Permalinks, and make sure the .htaccess file was copied.
  • Images missing or loading from the old domain: run a search and replace for the old URL.
  • Import fails or times out: raise PHP upload and time limits, or use the manual method.

Frequently asked questions

Will my site go down during the migration?

No, if you follow the order: copy, test, then switch DNS. The old site keeps working until DNS points to the new server.

Can EgWeb move my site for me?

Open a support ticket with the details of your old hosting, and our team will tell you how we can help.

Do I lose my SEO rankings when I change hosting?

No. If the domain and URLs stay the same, search engines simply see the same pages on a new server.

Need help? Open a support ticket or message us on WhatsApp +20 127 113 3655.

  • migrate WordPress, move WordPress to new host, All-in-One WP Migration, Duplicator, WordPress manual migration, transfer WordPress site, نقل موقع ووردبريس, نقل الموقع لاستضافة جديدة

Was this answer helpful?

0 Users Found This Useful