May have just locked myself out of my site...

fredfred547

Power Member
Joined
Oct 6, 2014
Messages
646
Reaction score
309
Well this awkward. I was trying to change my site's URL to https and so I changed "http" to "https" just like the picture below.
AN1UPTP

It now show https with a red line through it and the WP Admin log in page as well as the forgot password page is unresponsive. I click log in and it just refreshes the page. Any ideas on what to do?
(Note: The site above is NOT my site, just an example of what I changed.)
 
Try this:

Go into cpanel, phpMyAdmin, select the database of your website.
Now click on wp_options and the first two rows will be of siteurl and home. Try changing these 2 and see if it works.
 
You should have kept a spare key under the mat. :)
Haha how would I have done that? I now understand what I should've done in regards to the SSL certificate and what not but I can't correct my error because I can't even log in. :banghead:
 
See what umer is suggesting. It's the perfect solution for you IMO.
 
HEY! That's my website. Change it back to http in the database (wp_options table).
 
I think you follow a tut share on BHW ? its not a complete tut. Ask your hosting company to make your site normal like before.
 
Try this:

Go into cpanel, phpMyAdmin, select the database of your website.
Now click on wp_options and the first two rows will be of siteurl and home. Try changing these 2 and see if it works.
Ok I made it to phpMyAdmin but I can't find wp-options. Here's what I see Capture.jpg
 
Ok I made it to phpMyAdmin but I can't find wp-options. Here's what I see

Select the database of your website. If you are not sure which one, then click each one by one > Go into wp_options. The one with the url of your website is the required databse. Once you click on database, many options will appear. Click on wp_option and the first two rows will be of siteurl and home. Click on edit and change the values back to http.
 
Did some digging around and found it, it was just in a different folder. Thank you SO MUCH to @umerjutt00 :clap2: and everyone else for the replies.
 
HEY! That's my website. Change it back to http in the database (wp_options table).
Yes, I was trying to find a picture to use as an example and remembered your post ( I read it a few days ago) and decided to use it. If that was a problem just let me know and I'll remove it.
 
Try this:

Go into cpanel, phpMyAdmin, select the database of your website.
Now click on wp_options and the first two rows will be of siteurl and home. Try changing these 2 and see if it works.
This is how I changed my site's URL when I was in a similar situation last year. :) You can modify a lot of things from wp_options ;)
 
This is not the preferred solution, nor will it work in every scenario. However, I'm happy your issue is resolved. Having done this many times myself I can tell you the best working solution is:

Edit functions.php

If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.

1. FTP to the site, and get a copy of the active theme's functions.php file. You're going to edit it in a simple text editor and upload it back to the site.

2. Add these two lines to the file, immediately after the initial "<?php" line.
update_option('siteurl','http://example.com');
update_option('home','http://example.com');


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

3. Upload the file back to your site, in the same location. FileZilla offers a handy "edit file" function to do all of the above rapidly; if you can use that, do so.

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

Generally one would also remove the ADDED lines once the issue is resolved.
 
He may not be an expert, or even an advanced user (php / FTP) to manage that solution though. :)
So the other/first solution by umerjutt00 IS the preferred solution, and almost any newbie, who has some understanding of cpanel can use it almost flawlessly.

This is not the preferred solution, nor will it work in every scenario. However, I'm happy your issue is resolved. Having done this many times myself I can tell you the best working solution is:
 
Try this:

Go into cpanel, phpMyAdmin, select the database of your website.
Now click on wp_options and the first two rows will be of siteurl and home. Try changing these 2 and see if it works.

I'm guessing this will solve his issue. It's easy enough to follow, so it's irrelevant if you're a newbie or an expert.
 
Back
Top