If you want to change your domain name in WordPress, once you have purchased a desired domain name.
Login to your WordPress admin panel.
Go to setting > General
and under the site address(URL) update the link to your new domain.
leave the WordPress address (URL) well alone as this is the directory of where your site information is stored.
Save the Changes