Connecting an RDS instance to WordPress on EC2

Once our RDS instance has been created, we will set up WordPress on our EC2 instance.

For this tutorial, we'll be using an Ubuntu 16.04 instance. Go ahead, and spin up an Ubuntu EC2 instance. In the inbound rules settings, ensure that you allow traffic to port 80 and 443 (HTTP and HTTPS):

  1. SSH into the Ubuntu instance. We'll now set up the instance to be able to host the WordPress website. Before proceeding, run apt update and apt upgrade.
  2. Install Apache server on your EC2 machine:
sudo apt-get install apache2 apache2-utils
  1. To start the Apache service, you can run the following command:
sudo systemctl start apache2

To see whether the instance is working, you can visit http://<<EC2 IP Address>> ...

Get Hands-On AWS Penetration Testing with Kali Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.