AWS RDS AND WORDPRESS SETUP
Hello , This article is about how we can setup a aws rds and wordpress so that the data of wordpress get store in the amazon relational database
for the above setup I used wordpress app which was downloaded from internet.
you can refer the following link
https://wordpress.org/latest.tar.gz
or you can also use cmd like wget to download this app
Step1. Create a amazon rds database by simple giving some basic info like i have given in following snapshots
Be sure to select your preferred tier i used free tier since i was just practicing…
Select the version of my sql that will be comaptible with the wordpress php version .I used my sql 5.7 with php 7.4
Step2.
Configure a aws instance as a webserver i used apache httpd webserver since i used redhat8 linux ami for the instance.
you can use following cmd to install httpd
yum install httpd -y
php 7 packages are available in remi repo which depends onto the EPEL repo use following cmds to do the same
for EPEL
yum install https://dl.fedoraproject.org/pub/epel/epel-release- latest-8.noarch.rpm
for REMI
yum install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
Step3. install php-remi7.4 and the mysqlnd driver for php
Step4 .Now untar the downloaded wordpress app into the /var/www/html folder and disable selinux and run following cmd so that the httpd can write the data
cmd for disabling selinx
setenforce 0
cmd which enables httpd to write data
chcon -t httpd_sys_rw_content_t /var/www/html/wordpress -R
Step 5 . Start httpd service using following cmd
systemctl start httpd
Step 6 use instance publicip to see website
publicIP/wordpress
Step7 . give the database details and if the config file doesn’t get created copy the content and and create a file in /var/www/html/wordpress folder so that we can login to database
Step 8 create a account and login to tour account we can also login to the database using mysql client cmd for this install mysql and use following cmd
mysql -h endpoint url -u username -p
give password and we are successfully logged into the database
Below are the ss of above process which you can refer
Below are some ss that show the databases smd execution after we have logged into the database using mysql client cmd