WP changes siteurl, but some URLs then don’t work

The easiest (and proper, IMHO) was is to make changes to the wp-options table. Using the update_option in the wp-config.php is not the proper way to do it. (And I’m not a big fan of changing the values in the wp-config.php file.) It’s possible that adding a trailing slash might help (depends on your hosting and htaccess settings).

See the Codex for help with changing the site url. https://codex.wordpress.org/Moving_WordPress

And you will need to use a search/replace process to change any hard links to the old place in your database. I use the “Better Search and Replace” plugin, which works quite well. (Backups are good before doing changes.)