Using AWS EC2 and RDS to implement WordPress

🔅 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.

Creating AWS EC2 Instance

Select the EC2 service in AWS console



Press the button "Launch instance"



I selected the Amazon Linux AMI


I chose "t2.micro" as the instance type

I am leaving the instance details to default


I am using the minimum storage required for the instance

I added the tag with key as Name and value as WordPress


I allowed all kind of traffic through Security Group


At last launch the instance

I have used an existing key pair for the instance



The instance is launched successfully and is in running state



By clicking on the instance ID all the details will be displayed



Username, IP address, Private key are required to connect to the instance



Configuring the details in PuTTY




"sudo su -" will switch from ec2-user to root user

"yum install httpd -y" will download and install the httpd server



Using the URL "https://wordpress.org/latest.tar.gz" I downloaded the WordPress with wget command



The downloaded the software is moved to /var/www/html/ which is path of webserver and extracted using tar



The commands "yum install php -y" and "yum install php-cli php-pdo php-fpm php-json php-mysqlnd -y" will install all the php and its  related packages for mysql





By running the command "systemctl start httpd" the server will start running



These are the steps to start a DataBase in RDS service of AWS



Select the button "Create database"



Select the type of Database and creation method



Select the version of MySQL and template of database



Set the DB identifier, username and password 



Select instance class of database to launch



Select storage size and storage type



Availability and Durability can be selected in other than free tier



Provide public access to connect database outside VPC



Select the VPC in which the database to be launched



The final step is to create the database



The details of the database are displayed in that the Endpoint is needed to establish connection with the database



By using the IP address connect to wordpress then this page appears



Enter the required details in the next page



WordPress is successfully launched with AWS EC2 and AWS RDS


#vimaldaga #righteducation #educationredefine #rightmentor #worldrecordholder #linuxworld #makingindiafutureready #righeducation #arthbylw#php #apache #wordpress #aws #rds #mysql #rdbms

Comments