WordPress Migration Guide: Fix Redirects, Login Issues, and Elementor Loading Problems Step by Step | How to Migrate a WordPress Website Using Hosting Cpanel
Written by Jogen Rabha
Jogen Rabha

Jogen Rabha is the Founder and CEO of 24siteshop Private Limited, with over 8 years of hands-on experience in website development. He specializes in building performance-driven WordPress websites for businesses, startups, NGOs, and service-based companies. Over the years, Jogen has worked on hundreds of real client projects, focusing on clean design, user experience, speed optimization, and SEO-friendly structures. His approach is practical and result-oriented โ€” every website is built with a clear business goal, whether itโ€™s lead generation, online presence, or digital growth. Jogen believes in transparency, real proof of work, and long-term client support rather than shortcuts or false promises. Through 24siteshop, he continues to help businesses establish a strong online identity using modern web technologies, proven workflows, and real-world development experience.

Read more about the author

Migrating a WordPress website to a new domain or hosting can sometimes create frustrating issues like redirects, login errors, broken SSL, or Elementor getting stuck while loading. This guide gives you a complete step-by-step process โ€” from taking backups to restoring, migrating, and fixing all common errors.


1. What to Do Before Migrating a WordPress Website?

Before you start, always create a backup so you can restore if anything breaks.

Steps:

  • Backup Website Files: Download all files from public_html (or WordPress folder) using File Manager or FTP.
  • Backup Database: In phpMyAdmin โ†’ Export โ†’ Quick โ†’ SQL file.
  • Save Configurations: Copy your existing wp-config.php file.

2. How to Migrate WordPress to a New Domain or Hosting?

When moving your site to a new host or domain, follow these steps:

  1. Upload WordPress files into the new hosting public_html.
  2. Create a new database in hosting.
  3. Import your old database using phpMyAdmin.
  4. Update wp-config.php with new database details:
define('DB_NAME', 'new_db');
define('DB_USER', 'new_user');
define('DB_PASSWORD', 'new_pass');
define('DB_HOST', 'localhost');
  1. In phpMyAdmin โ†’ table wp_options: update
siteurl โ†’ https://newdomain.com

home โ†’ https://newdomain.com

3. What to Do When the Site Redirects to the Old Domain?

If your site still points to the old domain after migration:

  • Double-check siteurl and home in database.
  • Run a search and replace in SQL or plugin (Better Search Replace):
UPDATE wp_posts SET post_content = REPLACE(post_content,'olddomain.com','newdomain.com');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value,'olddomain.com','newdomain.com');
UPDATE wp_options SET option_value = REPLACE(option_value,'olddomain.com','newdomain.com');
  • Check .htaccess for redirect rules.
  • Clear all caches (hosting, plugins, Cloudflare).

4. How to Restore WordPress Backup?

If migration goes wrong, restore your backup:

  1. Delete corrupted files/database.
  2. Upload the backed-up files again.
  3. Import the saved database.
  4. Update wp-config.php if database name/user changed.

5. How to Fix Elementor Keeps Loading and Not Opening?

Elementor needs the REST API (/wp-json/...) to work. If it keeps loading:

  1. Go to Settings โ†’ Permalinks โ†’ Save Changes (flush rewrite rules).
  2. Ensure .htaccess has WordPress default rules:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
  1. Update Elementor to the latest version.
  2. Clear cache (plugin + hosting).
  3. If issue persists โ†’ disable all plugins except Elementor โ†’ test โ†’ re-enable one by one.

6. What to Do When You Forget WordPress Login?

If you lose your WordPress login after migration:

  • Find Username/Email: In phpMyAdmin โ†’ wp_users.
  • Reset Password: Edit user_pass field โ†’ enter new password โ†’ select MD5 encryption.
  • Create a New Admin User (SQL):
INSERT INTO wp_users (user_login, user_pass, user_email, user_registered)
VALUES ('newadmin', MD5('StrongPass123'), 'admin@newdomain.com', NOW());

INSERT INTO wp_usermeta (user_id, meta_key, meta_value)
VALUES ((SELECT ID FROM wp_users WHERE user_login='newadmin'),
'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');

7. How to Fix SSL / HTTPS Errors After Migration?

If some resources show ERR_SSL_PROTOCOL_ERROR:

  • Install SSL in your hosting panel.
  • Set siteurl and home to https://.
  • Use Really Simple SSL plugin (optional).
  • Run search-replace for http:// โ†’ https://.

8. How to Prevent Issues in Future Migrations?

To avoid downtime and errors in the future:

โœ… Always take backup of files + database.
โœ… Update wp-config.php properly.
โœ… Update siteurl and home immediately.
โœ… Run search-replace for old domain references.
โœ… Save permalinks after migration (fixes REST API).
โœ… Install SSL before making site live.
โœ… Test Elementor editor and admin login before launch.


Final Thoughts

Migrating WordPress doesnโ€™t have to be stressful. By following this step-by-step migration guide, you can handle backups, restores, redirects, login problems, SSL errors, and Elementor loading issues with ease.

Keeping a simple checklist ensures your website migration will always be smooth, secure, and error-free.

Leave a Comment

Your email address will not be published. Required fields are marked *

Total Visitors: โ€”

Wait ! Leaving Already ?

Let me give you a better deal, Get 20% Flat OFF on all plans if you order today. Click the below WhatsApp link to avail the offer.

Offer Ends In

Note: This offer applies only if you place your order today.