Deploy WordPress with AWS RDS.



Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need.

Amazon RDS is available on several database instance types โ€” optimized for memory, performance or I/O โ€” and provides you with six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL Server. You can use the AWS Database Migration Service to easily migrate or replicate your existing databases to Amazon RDS

What is WordPress?

The simplest answer is this:

WordPress is your websiteโ€™s operating system.

Think of it this way, just like your smartphone needs either iOS or Android to work, your โ€œsmart-websiteโ€ needs WordPress. While WordPress is certainly not the only website operating system around, it is the unquestionable leader in this space. At the time of writing, WordPress runs 32% of all websites. Again, that is *all* websites

Steps 1:

Launch an EC2 instance For Deploying WordPress.

Steps 2:

Connect to EC2 Instance using Putty and install necessary libraries.

dnf update -y
dnf install httpd -y
dnf install wget
vim -y
dnf install
dnf install
dnf module install php:remi-7.4
dnf install php-mysqlnd -y
systemctl start httpd

dnf update -y (To check the latest update of packages)

dnf install httpd -y (To install Apache webserver)

dnf install vim wget -y (To install vim editor and wget cmd)

dnf module install php:remi-7.4 (To install PHP)

dnf install php-mysqlnd (To install MYSQL Server)

wget htttps:// (It will download a installation file on wordpress in ZIP format)

tar xf latest.tar.gz -C /var/www/html (It will unzip wordpress installtion file and copy it to /var/www/html/ directory)

systemctl start httpd (To start Apache Webserver)

Verify that your apache is working or not.

Enter your Public IP to Web browser.

Step 3:Launch RDS database For WordPress

  • Select MySQL as database type
  • In the Templates section, choose the Free tier.
  • DB instance identifier โ€” default
  • Master username โ€” admin
  • Master password โ€” Choose a password.
  • Confirm password โ€” Confirm the password
  • Availiability Zone โ€” us-east-1
  • Initial Database Name โ€” database-2

๐Ÿ‘‰ Click on Create Database

๐Ÿ‘‰ Select MySQL

๐Ÿ‘‰ Select Version & Template as Free Tier

๐Ÿ‘‰ Click On Create DataBase.

๐Ÿ‘‰ Here we see our RDS DataBase is successfully created.

๐Ÿ‘‰ Now if we wants to connect our database so we need the EndPoint URL.

๐Ÿ‘‰ Go to your instance and type this command to connect.

mysql -h endpoint url -u admin -p

Final Step: Letโ€™sConnect to WordPress.


๐Ÿ‘‰ Provide Databse Name,UserName,Password,Endpoint Url.

๐Ÿ‘‰ Click on Run the installation.

Yeah WordPress with MySQL Connection established successfully.๐Ÿ˜


Thank you ! if you like this article then please share this post

You can also follow me on my linked in profile by clicking on following link.

RedHat Certified Engineer| DevOps Enthusiast | Big Data Hadoop | RedHat Linux 8| AWS Cloud | GCP | Azure Cloud |GIT & GitHub |Python