How to fix WordPress redirect live site to localhost in login page

Today I share a simple tip of a big wordpress problem if you are new wordpress developer or freelancer like me.

The Problem is : How to fix WordPress redirect live site to localhost in login page
The Solutions is :

USE THIS CODE IN YOUR THEME FUNCTIONS FILE :

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