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

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.

Display ads
Multiplex

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