Change WordPress Site URLs Using functions.php File
Go to /var/www/html/wp-content/themes/your-theme-folder/
.
Edit file function.php
add this lines at the very end
save the file
REF: https://www.wpbeginner.com/wp-tutorials/how-to-change-your-wordpress-site-urls-step-by-step/