Access your WordPress Dashboard (e.g. http://yourdomain.com/wp-admin) > Settings > General.
Under the WordPress address (URL) and the Site address (URL) fields enter the domain that you wish your application to work with and save the changes.
The same modification is valid if you want to add “www” to your domain.
- Using phpMyAdmin
Change the siteurl and home options in your WordPress database. To do this, use the phpMyAdmin tool available in your Site Tools.
Once in phpMyAdmin, select your WordPress database and browse the table wp_options. Find the options siteurl and home and change their values to the new domain you want to use.
Make sure that you clear the cache of your browser and verify if your website is functional.
- Using WP-CLI over SSH
Connect to your hosting server via SSH, navigate to your WordPress installation folder and execute the following commands:
wp db export