WordPress localhost site redirect to live site
You need to replace database URL and directory path while downloading database from 1 provider to other. In your case, I suspect that you have downloaded database directly, without changing URL and directory path.
You need to re-download database. You can simply use "WP Migrate DB" plugin for this. You can find it here
Let me know if you need further assistance...
open your wp-config.php file and add this
define( 'WP_SITEURL', 'http://localhost/your_wordpress_folder' ); define( 'WP_HOME', 'http://localhost/your_wordpress_folder' );
then save the file from admin set the permalinks defaults and resave it with %postname%
if not work recreate your htaccess file
Hope it will work for you
Thanks
You need to update guid as well to for site url and admin url which is in wp_post table..
just run below query in your phpmyadmin
UPDATE wp_posts SET guid = replace(guid, 'http://liveserver', 'http://localhost');
I hope it will help you.