πŸ’« Integrating Amazon RDS with WordPress πŸ’«

Vrukshali Torawane
4 min readJan 20, 2021

⭐Amazon Relational Database Service (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.

⭐WordPress ⭐

WordPress is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database.

Let’s Begin…

πŸ”… Create an AWS EC2 instance

To create an EC2 instance I’m using Amazon Linux 2 image

πŸ”… Configure the instance mysql database and apache webserver.

  1. Install mysql
yum install mysql -y

2. Install PHP

amazon-linux-extras install php7.2 -y

3. Install httpd

yum install httpd -y

4. Install WordPress

wget https://wordpress.org/latest.tar.gz

5. Extract WordPress

tar -xzf latest.tar.gz

6. Moving WordPress folder to root directory /var/www/html

mv wordpress /var/www/html

7. Edit httpd configuration file

vim /etc/httpd/conf/httpd.confAllowOverride All

8. Start httpd service

πŸ”… 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.

πŸ‘‰πŸ» DataBase created :

πŸ‘‰πŸ» Creating mysql database :

CREATE DATABASE <database_name>;

πŸ‘‰πŸ» Here we can see database mywp1 is empty

use <database_name>;show tables;

πŸ‘‰πŸ» Now on browser:

http://<public_ip>/wordpress

πŸ‘‰πŸ» In my case it is not able to create wp-config.php file. Let me create it manually;

cat > wordpress/wp-config.php
# and save the file....

⭐ And here you can see task completed and now you can write blogs !! ⭐

πŸ‘‰πŸ» And now you can see wordpress stores information in mywp1 database :

use <database_name>;show tables;

Finally our Task is completed successfully !!!!πŸ˜„βœŒπŸ»

Thanks for Reading !! πŸ™ŒπŸ»πŸ˜πŸ“ƒ

πŸ”° Keep Learning !! Keep Sharing !! πŸ”°

--

--