Force WordPress to use SSL

Sometimes you need a high level of security for your WordPress website.  Did you know you can force WordPress to use SSL?

Of course this will only work if you have an SSL certificate installed for your domain otherwise you’ll freak your visitors out with invalid SSL certificate warning errors.

Add this line of code to your wp-config.php file located in the root of your WordPress installation.

define(‘FORCE_SSL_ADMIN’, true);

Now all of your site URL’s will begin with https:// and you can stick one to those would-be phishers.

Was this article helpful?

Get Your Free Security Fundamentals eBook

Enhance your website security with this free, quick and easy to implement guide.

Keep In Touch


Wil is a dad, WordPress consultant, WordPress developer, business coach and mentor. He co-organizes the WordPress Sydney meetup group and has been on the organising committee for WordCamp Sydney since 2014. He speaks at many special events and contributes to the WordPress open source project. His likes are chillies, craft beer and electrogravitics.

Comments are closed.