I changed the primary domain on a website I'm working on, but now when I go to wp-admin page and try to login it wont work. I assume this is because of this most recent change. Like changing something with my hosting company, is there somewhere in the FTP of wordpress that I have to update to tell it to now head to this new primary domain?

The website is working fine, I just can't login right now.

Any advice or suggestions on some change of files via FTP would be appreciated!


I figured it out!


All I did was add this to my wp-config file after the define('WP_DEBUG', true); command

  • 1
    This will override home and site URL values from database. But you should also change those from database too. – Robert hue Sep 3 '14 at 8:02

As you've already found, it's because the wp_home and wp_siteurl options in your database are set to the old domain. You can change these in your config file, or in the wp_options database table itself.

I would suggest you also do a find and replace over your database, otherwise links in your page content will continue to point to the old domain name.

This is a useful plugin: https://wordpress.org/plugins/search-and-replace/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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