Edit wp-config.php
It is possible to set the site URL manually in the
wp-config.php file.
Add these two lines to your wp-config.php, where "example.com" is the correct location of your site.
define('WP_HOME','example.com');
define('WP_SITEURL','example.com');
This is not necessarily the best fix, it's just hardcoding the values into the site itself. You won't be able to edit them on the General settings page anymore when using this method.
https://codex.wordpress.org/Changing_The_Site_URL