Changed site URL by mistake, lost site, got it back but only homepage
-
I accidentally changed my wordpress URL and temporarily lost access to my site. I followed the instructions listed here, from WordPress Codex, but only my Homepage is coming up, all other pages are blank – I can edit them in WordPress, but not preview or see them…I have no idea how to get my site back, I can’t even add new pages. Any ideas?
http://codex.wordpress.org/Changing_The_Site_URLEdit 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. 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 “<?php” line.
update_option(‘siteurl’,’http://example.com’);
update_option(‘home’,’http://example.com’);
Use your own URL instead of example.com, obviously.3. Upload the file back to your site, in the same location. FileZilla offers a handy “edit file” function to do all of the above rapidly; if you can use that, do so.
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.
- The topic ‘Changed site URL by mistake, lost site, got it back but only homepage’ is closed to new replies.