You have compiled these steps to refer to when you decide to Move WordPress to another domain.
Move WordPress Checklist
Backup the old site AND the database using at least 2 different methods. One could be using the Duplicator WordPress plugin and the other could be using another plugin or cPanel file zip + phpMyAdmin db export.
Set up a new virtual host on the target hosting.
Change DNS records and wait until the changes propagate
Set up an SSL certificate.
Copy or move the site to the new site’s document root folder. (that’s www, public_html, htdocs etc)
Set up a new database
Update target wp-config file to use the database credentials.
Import the database (via wp-cli) or via phpMyAdmin
Replace links – Do a smart search and replace wp-cli or search-replace plugin
Delete cache (wp-content/cache)
Check if the site still uses absolute paths pointing to the old document root (php and js code)
Check if .htaccess file contains the old domain name (usually redirects or caching plugins do this)
Set up MX records
Set up SPF records at registrar
Authenticate the new site with Google Search Console it’s better to use DNS (TXT record based authentication so Google recognizes different variations of your site.
Submit sitemap XML
Activate or switch the WordPress plugins licenses
Authorize the new domain with Google (re)captcha service
Post a blog post that you have changed the domain name
Old site
Set up a permanent redirect to the new site. We write an article How to Redirect Old Domain to New Domain via Apache .htaccess that you can check
Deactivate WordPress plugins licenses
Related links:
- https://wordpress.org/support/article/moving-wordpress/
- https://www.wpbeginner.com/wp-tutorials/how-to-properly-move-wordpress-to-a-new-domain-without-losing-seo/
Photo credit: Glenn Carstens Peters – Unsplash
What steps do you take when moving WordPress to another domain?