0

I have a site where I recently added an SSL certificate. Everything was working fine until I added the certificate. Sometimes when I try to login the login page reloads and no error message is shown.

I realized that the form has a hidden field named redirect_to and the value is using http:// instead of https://. If I manually change that I can login with success so I guess that this is the problem.

Which is the right way to solve that? I think that I could and a little javascript to modify that when the page loads but maybe there are better ways

0

I used the Really Simple SSL plugin, which will do all the work for you: change the htaccess file, and ensures that all links are https. No muss, no fuss.

https://wordpress.org/plugins/really-simple-ssl/

If you want to do it yourself, you'll need to change the site values in Settings, General, change all templates that contain hardcoded HTTP references to HTTPS, set up the htaccess file, and more. But the plugin is the easiest way, IMHO.

  • I already have the plugin installed and I checked wp_options table. home and site url are with https – Alan Jul 31 '17 at 0:24
  • 1
    There are techniques that can be used to specify the redirect after the login form is submitted. Perhaps one of your plugins is doing so (or maybe the theme). Look for add_filter ('login_redirect', 'some_function') in plugin/theme code, or temporarily disable all plugins (quick way: rename the plugins folder) to see if that makes a difference. I assume that your htaccess is set up for HTTPS. – Rick Hellewell Jul 31 '17 at 0:50

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.