1

I tried force SSL certificate without observing all parameters, not understanding how it works, at my backend wp-admin, setting, changed HTTP to HTTPS and now can't access my backend any more and when I try to open my site, keep getting the following error in my browser:

Secure Connection Failed

What does this error mean and how can I fix it?

closed as off-topic by Jacob Peattie, bosco, rudtek, cjbj, Rick Hellewell May 18 at 23:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Jacob Peattie, bosco, rudtek, cjbj, Rick Hellewell
If this question can be reworded to fit the rules in the help center, please edit the question.

  • your website needs database update ( replacing url containing http with https ) – maverick Apr 26 at 3:44
  • @maverick – Seems OP has no SSL certificate at all. – leymannx Apr 27 at 19:54
0

Assuming that (it's not clear from your question):

  • you change htaccess to redirect http request to https (best way, IMHO). Lots of googles on that; your hosting place should also have guidance specific to thier hosting environment.
  • you changed the two URLs in the wp-options table to show the full URL with https

That's all that is really required for https, assuming that your hosting place has properly installed the SSL certificate.

If you have done the above, then please edit your answer to provide more (and detailed) details about what you have done so far, and what doesn't; work.

Note that will also need to do a search/replace for http://www.example.com replace with https://www.example.com . In particular, the media library items in the database will have the old URL. Lots of plugins to help with that; I like the "Better Search and Replace" plugin.

Of course, backups of database is always important when making changes.

  • Unfortunately adding a direct link using our web address in our wp-config.php file did not do the magic. i av even via ftp updated my wp to the current version. If this might help, we don't av ssl certificate according to my host. – opjbull Apr 26 at 8:41
  • 1
    If you don't have an SSL certificate then it won't work at all. If your host offers Auto SSL for domains hosted with them, then it should be free, but you will still need to activate it for your site. This usually happens through your control panel, unless your hosts have to do it. – Martin Jarvis Apr 26 at 8:52
0

If you can't access the site via your browser, try to get in via ftp, cPanel or the like. Find the wp-config.php file in the main site folder and add a direct link to your desired address, eg.

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

You can remove or update this whenever you wish.

This is as per https://codex.wordpress.org/Changing_The_Site_URL

  • If you look closely at that Codex entry, you'll find that they recommend changing the wp-options table before changing the wp-config.php file. See my answer wordpress.stackexchange.com/questions/335016/… . From the Codex "This is not necessarily the best fix, it's just hardcoding the values into the site itself. You won't be able to edit them on the General settings page anymore when using this method." I know that many answers say to do this, but I think the best way is changing in the wp-options table. – Rick Hellewell Apr 26 at 3:05
  • No I've just looked closely and 'they' don't recommend that. The reason it says it's 'not necessarily the best fix' is because it will override the address(es) in the General settings. Hence my additional comment: "simply remove or update this whenever you wish". I think for novice user, this is the easiest way to get them back into a site they've just broken, rather than stuffing around with database tables or htaccess files etc. Either way though! – Monkey Puzzle Apr 26 at 3:40
-1

Go to the phpmyadmin ->choose your site Database-> there is table 'wp_options' open it -> site url -> change it to as before like http: then redirect to https from .htaccess file from cpanel

  • Actually, there are two places where you have to enter the URL. See the Codex link I posted in my answer. – Rick Hellewell Apr 29 at 2:32

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