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:

http://www.example.com/_new/

I did this so that the old website continues to function under the main URL:

http://www.example.com

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

http://www.example.com/

it keeps getting re-directed to:

http://www.example.com/_new/

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.

Was it helpful?

Solution

You could make it in 2 ways :

  1. by adding in .htaccess with your Home Url
  2. Place below code in wp-config.php

    define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top