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.


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');

  • I just tried that; it doesn't work either. – Najeeb Sep 23 '17 at 7:17
  • 1
    Have you removed baseurl from .htaccess with newer one? – Pranav Bhatt Sep 23 '17 at 7:19
  • That did the trick. I commented out the following from .htaccess: RewriteBase /_new/ – Najeeb Sep 23 '17 at 7:24
  • And of course, I started a new browser session to clear the cache. (I was viewing the site in incognito mode so that the sessions are separate.) – Najeeb Sep 23 '17 at 7:26
  • You don't need to comment just keep as RewriteBase / – Pranav Bhatt Sep 23 '17 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.