Integrated WordPress with AWS RDS On AWS Cloud

Deepak Parihari
4 min readJul 19, 2021

What Is 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.

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.

What Is WordPress?

WordPress is open-source software, WordPress was primarily a tool to create a blog, rather than more traditional websites. That hasn’t been true for a long time, though. Nowadays, thanks to changes to the core code, as well as WordPress’ massive ecosystem of plugins and themes, you can create any type of website with WordPress.

Description :

🔅 Create an AWS EC2 instance
🔅 Configure the instance with Apache Webserver.
🔅 Download PHP application name “WordPress”.
🔅 As WordPress stores data at the backend in MySQL
Database server. Therefore, you need to setup a
MySQL server using AWS RDS service using Free Tier.
🔅 Provide the endpoint/connection string to the
WordPress application to make it work.

1. Launch an AWS EC2 instance of Redhat to launch WordPress

3. Install httpd using command :

4. Install MySQL using command :

5. Since WordPress uses the latest version of PHP i.e PHP-7.4. Install it by the following commands in the AWS instance :

sudo yum install amazon-linux-extras -y

amazon-linux-extras enable php7.4

6. Download WordPress code from the Internet and Extract it into /var/www/html folder and unzip it

Step 2: Create an RDS database For WordPress

  • Open Amazon RDS and click on Create Database
  • Select MySQL as the database type
  • In the Templates section, choose the Free tier.
  • DB instance identifierdefault
  • Master usernameadmin
  • Master password — Choose a password.
  • Confirm password — Confirm the password
  • Availability Zone — ap-south-b
  • Initial Database Name — database-1

Database Created Successfully

STEP 3: Connecting to the database and connecting to WordPress

And create the user database

2. Configure The wp-conf.php file by providing Database Name, User Name, Password, Endpoint Url

3. Connect to WordPress

And after installing WordPress and login you will see your website Live!! Running like this ;

Thank you !.. if you like this article then please share, comment, and like

!! Keep Learning & Growing !!

--

--