[ad_1]
I accidently changed the site url from the admin panel to an incorrect URL. This led to me not being able to access my site at all. Then I searched for some solutions, I edited the site\_url and stuff with myphpadmin and it worked! BUT the issue is when I try to access the admin panel through mywebsite.com/admin, it redirects to mybrokenurl.com/admin basically.
How would I fix this? Any help is greatly appreciated!
[ad_2]
Define the site URL in your wp-config file:
define( ‘WP_HOME’, ‘http://example.com’ );
define( ‘WP_SITEURL’, ‘http://example.com’ );
Then use Better Search Replace to update all of the URLs. Remove the definitions from wp-config when finished.