WordPress and Amazon Web Services is a winning combination. Although bit expensive than other hosting solutions, AWS certainly has its advantages when it comes to advanced features. Webmasters could easily setup auto-scaling or load balancing for high traffic websites using AWS advanced features. If you like to use any of those features, you need to install WordPress on AWS EC2 instance first. This post will give you step-by-step instructions to do that.
WordPress is fully compatible with Amazon Web Services. AWS EC2 instances are basically VPS. They can be configured as high performance web servers with little extra work. I’ll walk you through configuring your AWS EC2 instance and installing WordPress with SSL. I’ll try to make this tutorial as newbie friendly as possible.
We’ll be building our WordPress web server on AWS with Virtualmin v6.03 GPL control panel. It’s a free control panel and packs powerful features to manage a web server. Additionally, we’ll be installing Nginx v1.10.3, PHP v7.0.30 and MariaDB v10.0.36. Complete below steps to install WordPress on AWS EC2 Instance with SSL.
Hire me and have your WordPress ready within 24 hours!
Get WordPress Installed
Step #1 – Create an EC2 instance for WordPress and install Virtualmin
This step will get your AWS EC2 instance ready for WordPress. We’ll create an EC2 instance with Ubuntu 16.04 as operating system and install Virtualmin. This is the hardest part of the WordPress installation process. But my newbie friendly instructions will make it easy to setup your EC2 instance with Virtualmin even if you’re totally new to AWS and EC2.
Tutorial: Install Virtualmin on AWS EC2 instance
Step #2 – Add your WordPress domain to Virtualmin on AWS
You should have a domain name or subdomain ready for WordPress by now. It’s now time to add it to Virtualmin. Virtualmin has something called Virtual Servers for this purpose. You need to create a top-level server within Virtualmin for each of your domains. Don’t forget to point your WordPress domain to EC2 instance with an A record.
Tutorial: Add WordPress domain to Virtualmin
Step #3 – Enable SSL (https) for WordPress on AWS EC2
Virtualmin comes with built-in support for Let’s Encrypt SSL certificates. Now that you have Virtualmin installed and WordPress domain added to your EC2 instance, it is the perfect time to enable Let’s Encrypt SSL for WordPress. Let’s Encrypt SSL certificates are issued free of charge and Virtualmin is capable of auto renewing them.
Step #4 – Obtain WordPress MySQL database credentials from Virtualmin on AWS
Virtualmin automatically creates a MySQL database for your WordPress when you add your domain with above instructions. But it won’t display login credentials on-screen. You’ll need this information to complete the WordPress installation on AWS EC2. Fortunately you can easily get MySQL credentials from Virtualmin.
Step #5 – Install WordPress on AWS EC2 with Virtualmin
You have everything setup for WordPress now. We took care of every little configuration that is required to run a perfect web server on Amazon Web Services EC2. This step is to actually install WordPress on your AWS EC2 instance. Complete the installation with below tutorial. You can ignore the prerequisites section.
Tutorial : Install WordPress with Virtualmin
Step #6 – Redirect http to https with Virtualmin on AWS
Your WordPress should be fully functional at this point. We will wrap things up by setting up 301 redirects from http to https. This step increases WordPress security a bit. This will make sure nobody can spying on your WordPress traffic.
That’s it. If you’ve followed all the steps above, you now have a superfast WordPress installation on Amazon Web Services with Virtualmin control panel and LEMP stack. Head over to our sysadmin support forum to get help if you run into errors.