When you want to move a WordPress site from one domain to another, it’s not as simple as just updating a few DNS binding entries.
- Update your DNS entries on your domain provider (Google Domains, NameCheap, etc) for your new domain to point at the same server
- Ensure the binding records are setup to serve content from the directory where the WordPress site lives.
- Update your WordPress site database to ensure it points to the new domain. This step is commonly missed, hence this blog post. Login to the database using PhpMyAdmin or Sequel Pro and then invoke the following sql queries.
--first verify that you are on the right domain select option_value from wp_options where option_name = 'siteurl'; --update two wordpress options, with your new domain name update wp_options set option_value = 'NEWDOMAINHERE' where option_name in ('siteurl', 'home');