I am locked out of my WordPress site after changing site URL from Http to Https

If you don’t have access to your cPanel, or don’t know how to make a database change, you can instead add these 2 lines to your wp-config.php file:

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

You’ll of course want to change the urls to your actual urls. Just make sure you don’t have the “https” but “http”.

This will override your database entries.

Then go into your dashboard under settings and remove the https that you entered, hit save and you have fixed the problem. If you added https via a plugin, you’ll want to turn that plugin off.

You can then remove the two lines from your wp-config file and make sure everything still works.

Two items to note.

One. If you’re using firefox and i believe Chrome. They may continue to try to load to the SSL version of your site now that they have it it their history. I have not gone into how to fix that here, but a quick google search will tell you how.

The other item. Just changing your db entries may not be the best idea as other it could damage serialized strings.

Leave a Comment