I've changed the http:// host to https://, then accidentally saved it. Now I can't log in to the admin panel having '404 Not Found' page. How can I fix this?

  • Welcome to WordPress Development. I hope you find the answer(s) you are looking for. Our site is different from most - if you have not done so yet, consider checking out the tour and help center to find out how things work. Commented Oct 18, 2019 at 1:44
  • if you have access to phpmyadmin, you need to update your database ( http://.... to https://.... ),
    – maverick
    Commented Oct 18, 2019 at 7:08

2 Answers 2

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );

Add this to your wp-config.php which you can find in the root of your website. Remember to change example.com to your URL.


Before I start, I should point out that I am making a few educated guesses about what you have done exactly. I will try to cover as much as I can. This is most likely an issue with the way your hosting is set up. WP.SE is not the ideal question to ask about that. However, depending on how comfortable you are with accessing the database itself, you should be able to locate the entry and revert your changes.

If you have access to your database, say with PHPMyAdmin, you can look for the wp_options table. In there you can find the rows with option_name "siteurl" & "home". You could then edit the option_value to reflect the hostname you require. More help on doing that can be found here. There are plenty of search results you could also help, but this was one of the first ones I found.

If you made the change to your options file, you will need to use FTP or your hosting file editor to revert your changes.

That said, you may wish to look at how your hosting provider assigns HTTPS and check that it is enabled, pointed at the same folder and has a valid certificate. You'd have to take to hosting support if you need help with that.

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.