How do I reset a self-hosted WordPress URL?

The easiest way to do this is by using copy&replace in the SQL file. Export the database. Use your favorite text editor and do a copy&replace and import it into a new database.

Then you go to wp-config.php and you change the WP_HOME and WP_SITEURL to the new host. Then you change the databasename. You also need to ensure that the same db user has access to the database.

Btw: There is a separate stackexchange for wordpress. Check out How do I move a WordPress site to another server?