• Hi everyone,

    I tried to move my website to a new domain name, and ended up changing the 2 url fields in “General Settings”. Needless to say I wasn’t successful and I couldn’t access the log in page after that. So I got frustrated, fiddled around with the database and ended up deleting the two url entries in wp-options. I then learned that had I not deleted them, I would have been able to switch them back to the old url. I have not been able to find a way to recover the entries.

    I have read the help page on changing the site url, but those no longer works now that I have deleted the two entries in the database.

    My domain is also not active yet, so my site really just doesn’t work.

    What can I do now? Is there any way to retrieve the two entries? Or edit the site url through another means (I just want it to point back to https://localhost? Or is my site lost forever?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Use the functions.php method mentioned on that page to put the entries back in the database:

    https://codex.www.ads-software.com/Changing_The_Site_URL#Edit_functions.php

    Thread Starter Mallee Li

    (@mallee-li)

    Thanks for the reply Samuel.

    Unfortunately I am not very familiar with this and I don’t think I have access to the site via FTP. I am using XAMPP, and I have only just noticed the FileZilla module which was not active before. Will it still work?

    If it will, how do I FTP to the site and get a copy of the active theme’s functions.php file? I have opened the admin window of FileZillabut I am not sure how to proceed from there. Thanks.

    If this a locally hosted site, just navigate to the current active theme’s folder to access its function.php file.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    If you’re using XAMPP, you don’t need FTP. Just go to your htdocs directory and find and edit the file in the theme manually using any text editor.

    Thread Starter Mallee Li

    (@mallee-li)

    Hi Esmi, it was locally hosted until I tried to change the url to another (inactive) domain. So now I am not sure if it is locally hosted or just in limbo.

    Samuel, thanks for the reply but I may need you to break it down a bit more for me. I opened htdocs and found a theme.php file in one of the sub-folders (C:\xampp\htdocs\wp\wp-content\themes\[my theme]). Is that the right file and folder?

    I am also not sure what I am supposed to be looking for and editing in the file. I can’t find the new url that I had tried to redirect my site to, and I can’t find the localhost url either in the file (if those are what I am supposed to be looking for).

    Thread Starter Mallee Li

    (@mallee-li)

    Bumping for help.

    Open your theme’s functions.php file found here:

    xampp
         htdocs
               wp
                 wp-content
                           themes
                                 [your theme]
                                          functions.php

    Use the instructions in https://codex.www.ads-software.com/Changing_The_Site_URL#Edit_functions.php as follows:

    2. Add these two lines to the (functions.php) file, immediately after the initial “<?php” line:

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

    Use your own URL instead of example.com, obviously.

    3. Upload he file back to your site/save the file, in the same location.

    4. Load the login or admin page a couple of times. The site should come back up.

    Important! Do not leave those lines in the functions.php file. Remove them after the site is up and running again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Deleted siteurl entry in phpMyAdmin, now unable to access my site’ is closed to new replies.