I have develop a site (word press) locally and move it in to a remote server. Everything seems fine except when I click the home link it redirect to my localhost website.
To fix this what I did was,
Changed the site url and home url to web url without adding the slash after the url.
Apart from that I added the following code to wp_config.php
define('WP_HOME', 'http://mysite.com');
define('WP_SITEURL', 'http://mysite.com');
But when click the home button it still redirect in to the localsite.
I have changed wp_option table also
you need to change url into database too
I had to update the url given in menu navigation for Home button.
In wp_options table change siteurl option value to your live site url.
If still problem exists search ‘localhost’ in your db and replace it with live site url.
Update wp_options table in database for siteurl and home. In the table first row is siteurl and 36th row is home.
Changing
wp_options
table worked. Had to make sure to clear cache.I would guess that 99% of web developers work on localhost and then deploy to somewhere that is obviously NOT localhost. It really annoys be that this sort of error happens. How much time is wasted by not having a live vs dev setting for this? Mine is still insisting on going to localhost. I’m going to have to search my HDD for the word localhost at this stage
Finally found it under General Settings – Site Address URL which does not correspond to what is in wp_options.