Switch WordPress to HTTPS with free Let’s Encrypt certificates

How to switch your WordPress blog to HTTPSAs the one or other may have noticed, en.code-bude.net is running strictly via HTTPS protocol since some days. All requests via HTTP protocol will be redirected to HTTPS. How exactly the switch from HTTP to HTTPS for code-bude.net was realised and what things to have in mind, I want to explain in the following article.
This article shall show you how to change your WordPress blog setup from HTTP to HTTPS. As a basis for the article I used my setup, which consists of a VPS (virtual private server) with runs Ubuntu Server as operating system and Apache as a web server.
To give you a better overview, I divided the article in the following parts:

Why you should use HTTPS for a WordPress blog?
How to install Certbot and generate SSL certificates
Automatically renew SSL certificates with Certbot
Configure Apache to use Let’s Encrypt certificates
Switch […]