Deploy WordPress Over EC2 instance Using AWS RDS as MYSQL Database Server.
AWS RDS(Relational Database Service)
Amazon RDS is a managed relational database service that provides you six familiar database engines to choose from, including Amazon Aurora, MySQL, MariaDB, Oracle, Microsoft SQL Server, and PostgreSQL.
Amazon RDS makes it easy to use replication to enhance availability and reliability for production workloads. Using the Multi-AZ deployment option, you can run mission-critical workloads with high availability and built-in automated fail-over from your primary database to a synchronously replicated secondary database. Using Read Replicas, you can scale out beyond the capacity of a single database deployment for read-heavy database workloads.
- Create Database Server Using AWS RDS(Relational Database Service).
- Provision an EC2 Instance.
- Configure an environment for the WordPress application.
- Download the WordPress application and configure it.
- Configuring WordPress, provide the endpoint/connection string to WordPress.
Step-1: Create Database Server Using AWS RDS(Relational Database Service).
We need an RDS-MYSQL instance with public access and for this follows below steps shown in the pictures.
One more thing you have to change and is the security group of this MYSQL instance.
Instead of giving source “anywhere” you can provide a security group of your instance.
Step-2: Provision an EC2 Instance.
I am using Amazon AMI in this demo.
Give proper tag value and security group to the instance. As we need to login into the system and to access the front of WordPress allow ports 22 and 80 respectively.
That's all and click on next-next and launch instance.
Step-3: Configure an environment for the WordPress application.
As WordPress application is written in PHP we have to instance PHP having version 7.0+ and To use this website we need a webserver.
Install Apache Webserver and PHP
Step-4: Download the WordPress application and configure it.
Copy or move content inside wordpress and Start the webserver server.
Step-5: Configuring WordPress, provide the endpoint/connection string to WordPress.
Copy all content in a file with the name wp-config.php
If you see below the left Image that means you have successfully set up a WordPress application.
Congratulations🤩, we are Successful in deploying WordPress applications on an EC2 instance using RDS-MySQL Database.