Update WordPress Site URL is easier than you might think. If your site was set up with the other Url and you want to change it, just follow one of the below Method :
First Method: Using Dashboard
Go to Dashboard >> General Settings:
Here you can change the WordPress Address (URL) and the Site Address (URL). Simply save your settings.
Second Method: Using phpMyAdmin
- Go into phpMyAdmin.
- Update the wp_options table and set siteurl and home values to http://example.com