0

I have a bothering PHP warning for ages, and I am wondering if someone has solution to this. The following two-line warning is constantly recording in my error_log file:

PHP Warning:  Use of undefined constant ‘FORCE_SSL_LOGIN’ - assumed '‘FORCE_SSL_LOGIN’' (this will throw an Error in a future version of PHP) in /home/myuser/public_html/wp-config.php on line 92

PHP Warning:  Use of undefined constant ‘FORCE_SSL_ADMIN’ - assumed '‘FORCE_SSL_ADMIN’' (this will throw an Error in a future version of PHP) in /home/myuser/public_html/wp-config.php on line 93

In wp-config.php I have the following for line 92 and 93 lines:

define(‘FORCE_SSL_LOGIN’, true);
define(‘FORCE_SSL_ADMIN’, true);

line 91 is empty and line 90 is define('WP_DEBUG', false);

More information: My php version: 7.4.16; Webserver: LiteSpeed; cURL Version: 7.74.0 OpenSSL/1.1.1k.

I have this warning more than a year or two years and with different versions of phps

I am using the plug-in Really Simple SSL on my website as well and everything is fine with that. I also use All-in-one security and firewall on my websites.

Deactivating of plug-ins didn’t help. Any solution to this?

2
  • It's the quote.. Use ' instead of
    – Abhik
    Commented May 23, 2021 at 17:12
  • Oh! Thanks a million! Now it is solved!
    – Mahdi
    Commented May 23, 2021 at 21:00

2 Answers 2

1

Edit wp-config file :

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

just copy this and paste in wp-config file.

best wishes for you

0
define( 'WP_HOME', 'https://RanaAJANS.com/' ); #httpS...
define( 'WP_SITEURL', 'https://RanaAJANS.com/' ); #httpS...
define( 'FORCE_SSL', true); 
define( 'FORCE_SSL_ADMIN', true); 
define( 'COOKIE_DOMAIN', '.RanaAJANS.com');
@ini_set( 'session.cookie_httponly', true);
@ini_set( 'session.cookie_secure', true);
@ini_set( 'session.use_only_cookies', true);
#header( 'X-Frame-Options: SAMEORIGIN');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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