Properly editing and then temporarily adding one of these near the top of wp-config.php might get you back in:
/*-either-*/
/** @ near top of wp-config.php /*toggle on/off*
define('WP_HOME','https://domain.com');
define('WP_SITEURL','https://domain.com');
/*-or-*/
/** @ near top of wp-config.php /*toggle on/off*
define('WP_HOME','https://www.domain.com');
define('WP_SITEURL','https://www.domain.com');
/*-end-*/
Pick with or without ‘www’ and do not add a trailing slash, and then add a slash at the end of ‘/*toggle on/off*’ to activate the next two lines.
If the above does not work, this might help nearer the bottom of wp-config:
/** https://codex.www.ads-software.com/Changing_The_Site_URL#Relocate_method
/* @ just above "That's all, stop editing!" in wp-config.php
* WordPress supports an automatic relocation method intended as quick assist
* for getting a site working after relocating it from one server to another.
* After the "define" statements and just before "That's all, stop editing!",
* add this next line (and a slash at the end of this one to turn it on): /*toggle on/off*
define('RELOCATE',true);
/* Next Login as normal after being certain of the address being sent from your browser.
* Then look again in your browser's address bar to verify that you have logged in at the correct server.
* If this is the case, next go to Dashboard > Settings > General and verify the address settings and save them.
* Once the above has been completed, either remove the above 'define('RELOCATE',true);' line
* or comment it out with '//' or change the 'true' value to 'false'.
* Note: When the RELOCATE flag is set to 'true', the Site URL will be automatically
* updated to whatever path is being used to access the login screen. This will get the admin
* section up and running on the new URL, but it will not correct any other part of the setup.
* Those will still need to be altered manually.
If you still have trouble after getting back in, here is one more piece I have used in functions.php of a Child Theme:
<?php
/** @ near top of theme functions.php
/*-either-*/
/* @ theme/functions.php /*toggle on/off*
update_option('siteurl','https://domain.com');
update_option('home','https://domain.com');
/*-or-*/
/** @ near top of theme/functions.php /*toggle on/off*
update_option('siteurl','https://www.domain.com');
update_option('home','https://www.domain.com');
/*-end-*/