Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have included the following into my wp-config.php file:

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

But getting these error messages at the login screen for my WP dashboard:

Notice: Constant FORCE_SSL_LOGIN already defined in D:\xampp\htdocs\wordpress01\wp-config.php on line 102

Notice: Constant FORCE_SSL_ADMIN already defined in D:\xampp\htdocs\wordpress01\wp-config.php on line 103

Kindly explain why I am getting these error messages and how I can rectify the situation to force ssl login.

share|improve this question
add comment

2 Answers

You cannot redefine a constant.

The notice(s) pretty much tell you what's going on. Verbatim.
Check lines 102 & 103. The two constants are defined there. As well as somewhere else.

cd /path/to/wordpress/ && grep -r FORCE_SSL .

from a *nix shell should reveal those location(s).

share|improve this answer
    
Thank you for your reply. I inserted those lines 102 and 103. and that resulted in these error messages. Can you tell me where they can be found predefined? –  Debashis Sikdar Jul 18 '13 at 12:38
    
See updated answer. –  Johannes Pille Jul 18 '13 at 12:58
    
Thanks, but I'm using Xampp for Windows. I can't locate where else these is defined and can't make out how to force ssl login. –  Debashis Sikdar Jul 18 '13 at 13:15
    
add comment

See WordPress Administration over SSL page. In there, it says :

The constant FORCE_SSL_LOGIN can be set to true to force all logins to happen over SSL. This (and all other such definitions) must be placed before

/* That's all, stop editing! Happy blogging. */

in the file, otherwise they will not take effect.

I encountered the same problem and moving the code to above the line :

/* That's all, stop editing! Happy blogging. */

in wp-config.php solved the problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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