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.

  • exact same problem; did you get a 502 index error as well – Kyle Calica-St Sep 29 '17 at 5:46
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.

  • this did not work for me at all. it returns a 502 gateway error if i try to access my site at index – Kyle Calica-St Sep 29 '17 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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