If you have migrated your WordPress site to a new domain and are experiencing issues with it redirecting to the old domain, here are some steps you can take to fix it:

Update the site URL in the WordPress dashboard: Log in to your WordPress dashboard and go to Settings > General. Make sure the WordPress Address (URL) and Site Address (URL) are both set to the new domain.

Update the wp-config.php file: Connect to your website via FTP or file manager, locate the wp-config.php file and open it in a text editor. Look for the lines that define the site URL and home URL and update them to the new domain.

Update the .htaccess file: Locate the .htaccess file in your website’s root directory and open it in a text editor. Look for any lines that contain the old domain and update them to the new domain.

Check for any hardcoded URLs: If you have hardcoded any URLs in your website’s theme files, plugins or custom code, make sure to update them to the new domain.

Clear your browser cache: Sometimes, browser caching can cause issues with redirects. Clear your browser cache and cookies and try accessing your website again.

Similar Posts