If you just change your domain name in WordPress, you must update the database to be accessed. Surely WordPress admin page can not be accessed, because you just replace the domain name.
If you would change your domain name, do the replacement in database before setting WordPress address (URL) and Web address (URL) in settings > general.
How to change domain name in WordPress
How to change domain name in WordPress? Here’s how to rename your domain name in WordPress via the database.
Update Your WordPress database.
- Login to your cPanel.
- Search “Databases”
- Click “phpmyadmin”
- Select the database WordPress name, then click + symbol.
- Search wp_options
- Thick “siteurl” and “home” then click “Change” button at the bottom.
- Change “siteurl” and “home” with your new domain name, and then click “Go” button at the bottom.
Update Permalink Structure
- Login to your WordPress admin
- Click “Settings”
- Click “permalinks”, the save changes.
- Done. Your new domain now lives.
Read more:
How to add a Domain in cPanel