Website URL not getting updated
-
28-02-2021 - |
Question
I am using WordPress 4.8.2, and host is GoDaddy (shared hosting).
I developed my client's new website under a sub-directory like so:
I did this so that the old website continues to function under the main URL:
I now have to make my website live under this URL. To this end, I backed up the old website's files and directories in another folder, and then moved my own WP files and sub-directories under the main URL, so that my website becomes active.
I next modified the MySQL database entries like so:
db> update wp_options set option_value='http://www.example.com' where option_name='siteurl';
db> update wp_options set option_value='http://www.example.com' where option_name='home';
db> update wp_options set option_value='http://www.example.com' where option_name='MBFREE_HOMEURL';
Despite this, when I type
it keeps getting re-directed to:
I have placed a simple index.php file in the _new folder with the text hello world in it, and this is the page that is displayed.
I don't know what I may have missed. Any help will be appreciated.
Solution
You could make it in 2 ways :
- by adding in .htaccess with your Home Url
Place below code in wp-config.php
define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');