Locate the wp-config.php file in your WordPress installation directory.
Download a backup of the wp-config.php file to ensure you can restore it if needed.
Open the wp-config.php file using a text editor.
Find the lines that define the current site URL and home URL, which typically contain code like define('WP_SITEURL', 'http://example.com'); and define('WP_HOME', 'http://example.com');.
Update the URLs to the new values, making sure to include 'http://' or 'https://' and the appropriate domain name.
Save the changes to the wp-config.php file.
Upload the modified wp-config.php file back to your WordPress installation directory, replacing the existing file if prompted.