1

I have setup WordPress in my local machine and worked fine. I have accidentally changed WordPress Address (URL) and Site Address (URL). Now I am unable to access the local site. How can I fix this issue? Thank you in advance.

1
  • exact same problem; did you get a 502 index error as well Commented Sep 29, 2017 at 5:46

1 Answer 1

0

I was able to add WordPress Address (URL) and Site Address (URL) manually and access the local site again. What I did was add following code segments to following files.

  1. wp-config.php

    define('WP_HOME','http://www.local.abc.com');
    define('WP_SITEURL','http://www.local.abc.com');
    
  2. Functions.php

I have added following code just after opening of

   update_option('siteurl', 'http://www.local.abc.com' );
   update_option('home', 'http://www.local.abc.com' );

After that I have refresh site and it worked fine.

1
  • this did not work for me at all. it returns a 502 gateway error if i try to access my site at index Commented Sep 29, 2017 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.