Install EasyEngine to create SSL enabled WordPress blogs

One of the most common uses for a VPS is hosting a WordPress-based site.

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.

Prerequisites

  • 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.

Notes

  • 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.

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 www.DOMAIN.LTD and 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 Enter.

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:
Creating Cron Job for cert auto-renewal
Reload : nginx     [OK]
Congratulations! Successfully Configured SSl for Site  https:
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.

Conclusion

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 ee update.

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!

Source link

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More