Setup WordPress and RDS database over AWS

Setup WordPress and RDS database over AWS

ARTH Task 18

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

STEP 1: Creating AWS EC2 Instance

To launch ec2 instance we have to navigate to EC2 dashboard and click on launch instance . Then we have to give information about the instance like image , type of instance, security group, volumes etc. After that an instance will be launched, visible on dashboard.

No alt text provided for this image

STEP 2: Configure the instance with Apache Webserver. 

We can directly login to the instance using web browser or use putty. After login use the following commands to configure apache webserver.

#yum install httpd -y => To install apache webserver

No alt text provided for this image

#systemctl start httpd => To start apache webserver

#systemctl status httpd => To view status of httpd

No alt text provided for this image

Create a webpage - index.html

No alt text provided for this image

View webpage from browser -

No alt text provided for this image

STEP 3: Download php application name "WordPress"

For installing WordPress we should have php installed in our system with version 7 or above.

#amazon-linux-extras install php7.3 => install php7.3

No alt text provided for this image

# php -v => To see php version installed

No alt text provided for this image

Now to install WordPress on our instance

#wget https://wordpress.org/latest.tar.gz => download the WordPress software

No alt text provided for this image

#tar -xzf latest.tar.gz => unzip installation file

No alt text provided for this image

Now restart the httpd service so that server can pick up the changes

#systemctl restart httpd

Now we can see the welcome page WordPress when we visit to this url https://65.1.3134.132/wordpress then we shall be redirected to https://65.1.134.132/wordpress/wp-admin/setup-config.php

No alt text provided for this image

STEP 4: setup a MySQL server using AWS RDS service using Free Tier

To setup a MySQL server navigate to AWS RDS service and click on create database option then fill all the required fields like user, password, name of database, choose and free tier in templates .

When database is created you can see details of the database

No alt text provided for this image
No alt text provided for this image

STEP 5: Provide the endpoint/connection string to the WordPress application to make it work. 

In the image above we can see the endpoint URL. We have to put this URL ,user name, password and our database name in the page we obtain after step 3.

After that we can see a page like given below

No alt text provided for this image

Copy the content from above page , create a file "wp-config.php" in the /var/www/html/wordpress folder then copy the content to that file. At last click on Begin Installation to start installing WordPress . When the process of installation ends you will see the famous 5 minute WordPress installation process

No alt text provided for this image

Fill in the details and proceed. You Will see a success page like this one-

No alt text provided for this image

Finally WordPress is installed you can login with the given email and password and you can see the dashboard of dashboard of WordPress.

No alt text provided for this image


THANK YOU FOR READING..............

要查看或添加评论,请登录

Vivek Sharma的更多文章

社区洞察

其他会员也浏览了