https, WordPress

Enable https on WordPress Admin and Login

This post assumes that you have a valid SSL certificate installed on the host account for the WordPress site / domain in which you would like to enable admin control panel and account logins over https.

The simplest way to enable a https secure connection on your WordPress admin panel and account logins is via a wp-config.php update, using the following code.

https WordPress Logins via wp-config.php Update

To force an https connection for your WordPress site account logins only, use the code below in your sites wp-config.php file.

define('FORCE_SSL_LOGIN', true);

Again the above code will only enable https for account logins and NOT your administration panel.

Add the code to wp-config.php before the following comment and contained within the opening php statement.

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

https WordPress Admin Panel via wp-config.php Update

To enable https on your WordPress admin panel and account logins, use the code below in your wp-config.php rather than the code above.

define('FORCE_SSL_ADMIN', true);

Again this code needs to be added to your wp-config.php file before the following comment contained within the file and contained within the opening php statement.

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

Please ensure you only implement one of the methods mentioned above, both are not required.

WordPress SSL Plugins

If you are not confident in making the above edits or do not have access to your WordPress code base to make an update then one of the following WordPress SSL plugins may be useful:

SSL Insecure Content Fixer: https://wordpress.org/plugins/ssl-insecure-content-fixer/

SSL for Logged in Users: https://wordpress.org/plugins/ssl-for-logged-in-users/

WordPress HTTPS (SSL): https://wordpress.org/plugins/wordpress-https/

You may also want to enable an SSL for your entire WordPress site following Google’s recent announcement that site wide https is now a ranking factor. You can read more regarding this in my latest blog post: https://www.mathewporter.co.uk/google-announce-https-as-a-ranking-signal/.

The simplest way in which to do this is using the NertWorks Site Wide SSL plugin for WordPress which is available here: http://nertworks.com/site-wide-ssl-wordpress-plugin/.


Leave a Reply