Quick snippet for reference
add to top of functions.php for theme
update_option(‘siteurl’,'http://yoursite.com’);
update_option(‘home’,'http://yoursite.com’);
These instructions are found on the WordPress codex database but I’ve repeated them here for reference because it’s such a common issue for new WordPress developers.
WordPress Symptoms
My WordPress installation won’t let me login to admin panel. I edited the my WordPress Address Url and/or Site Address Url settings under Setting->General. I changed it and now I can’t get back into to fix the problem. The website loads a blank white page now.
The WordPress Solution
Edit functions.php
If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.
1. FTP to the site, and get a copy of the active theme’s functions.php file. If you don’t have Dreamweaver or similar you’re going to edit it in a simple text editor (like notepad) and upload it back to the site.
2. Add these two lines to the file, immediately after the initial opening php tag:
update_option(‘siteurl’,'http://yoursite.com’);
update_option(‘home’,'http://yoursite.com);
Use your own URL instead of yoursite.com, obviously. This link should be what the setting for WordPress Address and Site Address before you changed it.
3. Upload the file back to your site, in the same location.
4. Load the login or admin page a couple of times. The site should come back up.
5. Repeat the above steps, but remove those lines.
IMPORTANT: Do NOT leave those lines in there. Remove them immediately after the site is up and running again.
If there is no functions.php file in the theme:
Create a new text file called “functions.php”.
Edit it with notepad, and add this text to it, using your own URL instead of example.com:
update_option(‘siteurl’,'http://yoursite.com’);
update_option(‘home’,'http://yoursite.com’);
Upload that to your theme directory, then proceed as stated above. Remove the file afterwards.









Join The Conversion