fix for wordpress address (url) same as site address (url) error

Few days back playing with general settings on my dashboard something wrong happened and an error page popped up, I could access neither the dashboard nor wp-admin any more. I did not know what went wrong, what my blocked head could only remember was accidentally I made WordPress Address (URL) same as Site Address (URL) and boom!

I cannot tell how much i regretted doing it coz after wasting hours of digging wp-forums, i could make it work again. If you are encountering an issue like this the fix is here-

Open wp-content/themes/example/functions.php
Add these two lines to the file, immediately after the function <?php

update_option(‘siteurl’,'http://example.com/blog’);
update_option(‘home’,'http://example.com/blog’);

Use your own theme URL instead of ‘example’.
Once you put the manual entry, save and upload the functions.php back to the site.

Now go to the browser and try again example.com/blog/wp-admin, it will successfully take you to your login page.

Once you are up on the dashboard, Don not forget to delete the lines added before in functions.php and save and replace the file.

Back to dashboard, i could change my settings back again :)

This entry was posted in Designers View. Bookmark the permalink.

Leave a reply