Install EasyEngine to deploy SSL-enabled WordPress blogs
One of the most common uses for a VPS is hosting a WordPress-based site. While we covered the details of setting up both a LEMP stack and WordPress on top of that, some will prefer using a more user-friendly script to make the job a little bit easier. In this tutorial, we’re going to install EasyEngine, an open source “helper” program, to help create SSL-enabled (thanks to Let’s Encrypt) WordPress blogs in a matter of minutes.
The beauty of EasyEngine is that it not only sets up a WordPress blog, but automatically installs its dependencies, such as Nginx, PHP, MySQL, and others. There are a bunch of built-in features like caching and HHVM. With a single command, you can create a variety of WordPress configurations, such as WP Super Cache + Multisite, or Redis cache + single site.
As of v3.4.0, EasyEngine comes with built-in support for Let’s Encrypt as well.
In this tutorial, we’ll cover the details in installing EasyEngine and setting up a single WordPress site that uses HTTPS powered by a Let’s Encrypt certificate.
- A VPS running any of our OS options—Ubuntu 16.04, Debian 9, Debian 8, or CentOS 7.
- A non-root, `sudo`-enabled user. If you only have a `root` user, see our SSH tutorial for details on creating new users.
- A registered domain name.
- This tutorial uses variables to represent user-specific configurations, such as server IP addresses, passwords, domain names, and more. Whenever you see one of these variables, you should replace them with your specific details.
What’s the BEST DEAL in cloud hosting?
Develop at hyperspeed with a Performance VPS from SSD Nodes. We just DOUBLED the amount of blazing-fast NVMe storage and beefed up the CPU offering on these plans. There’s nothing else like it on the market, at least not at these prices.
Score a 16GB Performance VPS with 160GB of NVMe storage for just $109/year for a limited time!
Step 1: Install EasyEngine
Debian: Before we even try installing EasyEngine, let’s install
ca-certificates. If you don’t install this, the
wget portion of the following command will fail without any output.
$ sudo apt-get install ca-certificates
To install EasyEngine, simply run the command below:
$ wget -qO ee rt.cx/ee && sudo bash ee
The command first downloads the EasyEngine install script using
wget, and then executes it using
bash. As usual, we recommend that you take a moment to check out the script itself to ensure that it’s not installing anything you don’t want.
Step 2: Configure your DNS
Before you begin, make sure that you have pointed your domain toward your VPS’ IP address. In this case, both
DOMAIN.TLD need to point to the server. Let’s Encrypt requires these to match up in order to give the certificate. If you bought your domain name via SSD Nodes, we provide the necessary DNS to establish this configuration. If you bought your domain elsewhere, consider setting up a free CloudFlare account to use their DNS tools.
Step 3: Run EasyEngine
EasyEngine aims to make installing WordPress incredibly easy, and the same goes when adding a Let’s Encrypt certificate on top of that. It’s all done in a single command:
$ sudo ee site create DOMAIN.TLD --wp --letsencrypt
You’ll start to see output in the terminal as EasyEngine begins to download, install, and configure packages.
At some point, you will be requested to confirm that you want to use Let’s Encrypt. Just type in
y, followed by
Letsencrypt is currently in beta phase. Do you wish to enable SSl now for example.com? Type "y" to continue [n]:y
If Let’s Encrypt setup works successfully, you’ll see the following output:
Let's Encrypt successfully setup for your site Your certificate and chain have been saved at /etc/letsencrypt/live/example.com/fullchain.pem Configuring Nginx SSL configuration Adding /var/www/example.com/conf/nginx/ssl.conf Adding /etc/nginx/conf.d/force-ssl-example.com.conf Added HTTPS Force Redirection for Site http://DOMAIN.TLD Creating Cron Job for cert auto-renewal Reload : nginx [OK] Congratulations! Successfully Configured SSl for Site https://DOMAIN.TLD Your cert will expire within 89 days.
This basic configuration sets up a cron job to renew your certificate before it expires after 90 days.
You can access the root of the WordPress installation via
/var/www/example.com/htdocs. Even better, you’ll now be able to visit your new WordPress site via your domain.
Already have an EasyEngine site?
If you already have a WordPress site running via EasyEngine, you can \add a Let’s Encrypt certificate and reconfigure Nginx—again, with a single command.
sudo ee site update example.com --letsencrypt
As with the basic installation in step 2, this will enable a cron job to ensure the certificate is renewed regularly.
You should now be up and running with a SSL-enabled WordPress site, all in just a few commands.
If you want to update the EasyEngine core, simply run
You can also update your individual sites with new features, such as caching, with the
ee site update command:
$ sudo ee site update DOMAIN.TLD --wp --wpfc
The EasyEngine documentation contains many more tweaks, so curious developers should take some time to peruse them. Happy blogging!