Forums

[resolved] I ACCIDENTALLY CHANGED THE SITE URL - How did I get it restored? (2 posts)

  1. degini2
    Member
    Posted 6 months ago #

    Changing the Site URL
    There are four easy methods to change the Site URL manually. Any of these methods will work and perform much the same function.

    But here's the one that worked for me in a FLASH, just by following the steps:
    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. You're going to edit it in a simple text editor (like notepad) and upload it back to the site.
    (Here, i did not FTP the site, rather i went to the site's FILE MANAGER and searched for "functions.php". It brought out a couple of similar files, but i chose my current theme's functions.php i.e /public_html/awc/wp-content/themes/twentyeleven/functions.php. I double-clicked to open it and right-clicked to Edit it. Then i followed this next step...)

    2. Add these two lines to the file, immediately after the initial "<?php" line.

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

    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. (Here, I searched for the "<?php" line. It showed me several, so i went straight up to the first place it appeared - right at the top of the page - after editing it, I JUST CLICKED SAVE)

    4. Load the login or admin page a couple of times. The site should come back up. ( I went back to refresh my site and bingo...THERE IT IS!)

    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. (NOW I WENT TO THE functions.php FILE AND REMOVED THOSE LINES I CREATED)

    For more guide, go to http://codex.wordpress.org/Changing_The_Site_URL

  2. degini2
    Member
    Posted 6 months ago #

    However, i noticed that only the Home page was resolved. Other pages link to somewhere else in the site.
    AM looking to resolving it...but any fast ideas?

Reply

You must log in to post.

About this Topic