Using wp-config.php File or functions.php File to change New URL,


Using wp-config.php File or functions.php File
Way 1. Change WordPress Site URLs Using wp-config.php File
If you installed your wordpress such as : /var/www/html/wordpress/*
EDIT :
sudo vi /var/www/html/wordpress/wp-config.php
Next, add the following code at the bottom:
1. define( ‘WP_HOME’, ‘https://mywordpress.com’ );
2. define( ‘WP_SITEURL’, ‘https://mywordpress.com’ );
Way 2. Change WordPress Site URLs Using function.php File
If you installed your wordpress’s themes as urbane : /var/www/html/tippang/wp-content/themes/urbane/
EDIT :
sudo vi /var/www/html/tippang/wp-content/themes/urbane/function.php
Next, add the following code at the bottom:
1. update_option( ‘siteurl’, ‘https://mywordpress.com’ );
2. update_option( ‘home’, ‘https://mywordpress.com’ );
Once everything gets back to normal, remove the two lines of code by your changes