0

One of my firend accidently! Changed the WorsPress domain address to his expired domin address now we can't even connect to WP Login Page and WP is redirecting us to a domain address which does not exist any more! Can you please let me know how we can retrive the login credential or update the URL through The Database or Configuration Files?

Thanks

1 Answer 1

0

If you have access to the wp-config.php on the server, you can add the following constants that will override the database. This does not save the settings but will at least get you viewing the site again.

define( 'WP_SITEURL', 'url_to_wordpress_core_files' );
define( 'WP_HOME', 'url_to_wordpress_front_end' );

There is also a RELOCATE constant that will make the changes to the database - see the instructions here on how to do that.

Hope this helps!

2
  • Hi Welcher, thanks for reply I already tried adding these two lines into the functions.php and wp-config as well like update_option('siteurl','example.com'); update_option('home','example.com'); which I update the example.com to our own domain but I am getting Fatal error on top of white page when I add them to wp-cinfig and nothing change on functions.php
    – Suffii
    Commented Oct 1, 2014 at 18:27
  • Can you post the Fatal Error you are getting?
    – Welcher
    Commented Oct 1, 2014 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.