Support » Fixing WordPress » Forcing SSL in WordPress 2.6

  • Resolved Gerry Ilagan


    I am trying to setup SSL for wordpress 2.6 on my computer. I have installed wordpress, created a self-signed SSL cert, assigned a dedicated IP for the host (a non-routable IP address has been assigned) and modified the wp-config.php file to include the FORCE_SSL_ADMIN constant.

    I tried to access the /wp-admin from a non-secure URL ( but it’s not redirecting to the secure url (

    How do I force it to redirect? From what I understand on Ryan’s post it’s suppose to force SSL admin usage.

    Tried google search and this forum but i wasn’t able to find a solution.

    Hope someone could tell me how to do it or point me in the right docs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    Kihbord, the search, it is your friend.

    Copied from an earlier answer:
    Make a backup copy of your wp-config.php (backups are your friend). Now go to and insert that output in your wp-config.php above the line that says “stop editing”.

    Right below that, add

    define('FORCE_SSL_ADMIN', true);
    define('FORCE_SSL_LOGIN', true);

    And give it a shot. If all goes well, you’ll login via SSL and the admin pages will be mostly SSL based.

    If not, put back that copy of wp-config.php and you should be fine.
    Also on your browser, clear your cache and cookies.

    I’ve found the problem. When I inserted the define statements in my config file, I sort of copied and paste the thing from Ryan’s blog and instead of having ‘ quote in the define statements. The pasted code used a ` quote which caused it not to function properly. (hahahaha!)

    It’s now working flawlessly redirecting to https when i try to access the admin via http.


    So whats the difference? If I have a dedicated SSL cert and and the code`define(‘FORCE_SSL_ADMIN’, true);
    define(‘FORCE_SSL_LOGIN’, true);` then http.myblog will be https.myblog and….what? now my entire blog including admin and the public site are secure?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Forcing SSL in WordPress 2.6’ is closed to new replies.