WordPress localhost site always redirect to live site [closed]

Look in your wp_options database table for the siteurl and home options and check these are using your local URL.

As Captain S commented, these can also be overridden in your wp-config:

define('WP_HOME', 'http://www.localsite.test');
define('WP_SITEURL', 'http://www.localsite.test');