• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WPArena

WPArena

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections.

  • News
    • Opinion
  • Tutorials
  • Reviews
    • Themes
    • Plugins
  • Comparisons
  • Collections
    • Education Themes
    • Genesis Child Themes
    • Best Responsive Themes
    • Medical WordPress Themes
    • Finance & Business Themes
    • Crowdfunding Themes
  • Resources
    • Inspiration
  • Services
WPArena » Tutorials
Tutorials

How To Install Free SSL certificate using Let’s Encrypt

Avatar of Brian Link Brian Link Updated: April 9, 2018

FacebookTweetPinLinkedInEmailPrint

As you might notice, in the early of this year Automattic – the owner of WordPress has joined with many other big companies in sponsorship to a “new free and open certificate authority for the public” called Let’s Encrypt.

The idea behind Let’s Encrypt is to transition as many domains as possible from HTTP to HTTPS by providing a virtually painless one-click enrollment process during the server’s native installation.

You can read the whole article on WP Tavern here. Even right now the Let’s Encrypt is still running a beta version but today I would instruct you “how to install an SSL Certificate freely for your site.”

Install Let’s Encrypt

Yes, of course, first of all, we have to install Let’s Encrypt, just clone it from GitHub repository:

$ git clone https://github.com/certbot/certbot
$ cd letsencrypt
$ ./letsencrypt-auto --help

Now you have Let’s Encrypt on your server.

Install SSL Certificate on Apache

Even in beta version, Let’s Encrypt has a plugin allowing you to automatically obtain and install SSL certification on your site:

./letsencrypt-auto --apache

install ssl certificate - Apache SSL Installation

After running this command, you will be asked for your email, and if your server configuration does not contain your domain name, so you have to provide those: example.com and www.example.com (separated by space or comma).

install ssl certificate Apache

Wait for a while, if the message announces success. Then, your site now is under SSL certification.

Install SSL Certificate on Nginx

The Nginx plugin for automatic SSL Certificate installation is not completed, buggy then does not install in the letsencrypt-auto by default. Even though, we still can obtain the certificate only and setup it manually. Let’s do that.

Firstly, obtaining the SSL Certification only:

./letsencrypt-auto certonly --standalone

It is required to enter our email and domain name. If Let’s Encrypt is successful in verifying your domain name, then you will be informed that there are 2 certification files saved in /etc/letsencrypt/live/example.com/ named: fullchain.pem and privkey.pem.

Now we change the Nginx configuration to use this certificate. Edit your example.com file conf in /etc/nginx/sites-available/ (I’m using easyEngine to install WordPress so the conf file is located here, you might check your /etc/nginx/conf.d folder for other settings):

server {
    listen 443;
    server_name example.com;
    ssl on;
    ssl_certificate /var/www/example.com/cert/example.com.crt;
    ssl_certificate_key /var/www/example.com/cert/example.com.key;
 #... other stuff
}

And add this to force using SSL:

server {
    listen 80;
    server_name example.com;
    return 301 https://example.com$request_uri;
}

You also have to check your nginx.conf file in /etc/nginx/nginx.conf for SSL configuration, insert those lines if they are not there:

http {
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;
    #... other stuff
}

Finally, restart your Nginx server to get the result:

sudo service nginx restart

Ask WordPress to use SSL

Add following to your WordPress’s wp-config.php file.

To force SSL for login form:

define('FORCE_SSL_LOGIN', true);

To force SSL for the wp-admin section:

define('FORCE_SSL_ADMIN', true);

Conflict with CloudFlare

If you are using CloudFlare and let your domain run through CloudFlare server, you might get error TLS while Let’s Encrypt is verifying your domain like this:
Error: The server experienced a TLS error during domain verification

Don’t worry, you just need to pause your CloudFlare service and run the Let’s Encrypt setup again.

Verify SSL Certificate Installation

Last and the most important step is to verify if the SSL certificate installation is not properly.

Below are some nice online tools to help you:

  1. https://www.wormly.com/test_ssl
  2. https://globalsign.ssllabs.com/

If you want to dig deeper into using Let’s Encrypt or writing your own auto installation plugin – see the official documentation here.

This post was orginally published on: April 19, 2017 and was updated on: April 9, 2018.

Related Tags: Free SSL HTTPS Let's Encrypt SSL WordPress HTTPS (SSL)

FacebookTweetPinLinkedInEmailPrint

Related Stories

  • How to Build a Small Business Website on WordPress

    How to Build a Small Business Website on WordPress

  • How To Create A 404 Error Redirect For WordPress

    How To Create A 404 Error Redirect For WordPress

  • How To Make Your WordPress Blog Popular and Successful

Avatar of Brian Link

Brian Link

I am a WordPress Developer, Freelance Blogger. I want to travel the world, learn everything and share my knowledge.

Reader Interactions

Share Your Thoughts Cancel reply

Before submitting your comment, we kindly ask that you read our comment policy. Your email address will remain confidential and will not be published or shared anywhere. If you subscribe, you will receive notifications regarding new comments.

Primary Sidebar

Grammarly vs Jetpack vs Ginger vs Hemingway vs Standard Spellchecker

Grammarly vs Jetpack vs Ginger vs Hemingway vs Standard Spellchecker for WordPress

A featured image design of seo marketing tips

6 SEO Marketing Tips for Financial Business Websites

Recent Topics

  • Official Windows 7 Wallpapers
  • How to secure your WordPress images and content from Theft
  • Top 20 Web Designing Companies in the World
  • WP Rocket Review: Is It the Perfect Solution for WordPress Caching?
  • The Complete WordPress Security Guide 2023 – Step by Step

Footer

Top

  • Services
  • Our Themes
  • Facebook
  • Twitter
  • Linkedin

Reviews

  • Beaver Builder Review
  • Beaver Themer Review
  • WP User Frontend Pro
  • Ninja Forms Review
  • MemberPress Review

More Reviews »

Resources

  • Best WordPress Plugins
  • WordPress Permalinks Structure
  • Email Management System
  • Envato Free Files
  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact

Copyright © 2023 · All Rights Reserved · WPArena is a Project of TechAbout LLC.
We are not affiliated with Automattic or WordPress.

  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact
Share this ArticleLike this article? Email it to a friend!

Email sent!