๐ˆ๐ง๐ญ๐ž๐ ๐ซ๐š๐ญ๐ข๐จ๐ง ๐จ๐Ÿ ๐€๐ฆ๐š๐ณ๐จ๐ง ๐‘๐ƒ๐’ ๐ฐ๐ข๐ญ๐ก ๐Œ๐ฎ๐ฅ๐ญ๐ข-๐“๐ข๐ž๐ซ ๐€๐ฉ๐ฉ๐ฅ๐ข๐œ๐š๐ญ๐ข๐จ๐ง ๐–๐จ๐ซ๐๐๐ซ๐ž๐ฌ๐ฌ

๐Ÿ”ฐ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 we need to Setup a MySQL server using AWS RDS service using Free tier.

๐Ÿ”… Provide the endpoint/ connection string to PHP application to make it work

So Letโ€™s beginโ€ฆ..

Before moving ahead, letโ€™s know some basic introduction

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 written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes.

MySQL

MySQL is an open source, relational database management system (RDBMS) based on structured query language (SQL). MySQL is available on all major operating systems, including Windows, Linux and Solaris. It is free to use for individuals and non-production environments under the GNU General Public License; however, if used commercially, a commercial licence is required.

MySQL, like other relational databases, stores data in tables, columns and rows. Each entry is defined by a unique identifier. MySQL was designed and optimized for the web development arena; it is arguably the most common database used in web server deployments. MySQL works very well with Apache and PHP and is often the go to database for LAMP stack deployments. MySQL powers 9 out of 10 websites on the internet today, and is the database chosen by Facebook, Twitter and Wikipedia.

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.conf
AllowOverride All

8. Start httpd service

systemctl start httpd

For Storing the data WordPress used the MySQL Database Server. So we need to Configure the Database Using the Amazon RDS Service.

For Creating the Database in free tier follow the Below Steps carefully

Database Created Successfully โ€ฆโ€ฆ.!

Then we need to create MySQL Databse

CREATE DATABASE <database_name>;

here I have created a database named mydb.

Now On Browser give the public IP of Ec2-Instance

Browser Now

http://<public ip of ec2-instance>/wordpress

Here, we can see, it is not able to create wp-config.php fileโ˜๏ธ

So, we have to create it manallyโ€ฆ

cat > /var/www/html/wordpress/wp-config.php
# and save the fileโ€ฆ.

Here we can see that our Wordpress has been install successfully โ€ฆ

Now we are going to login into worpdress to make our website โ€ฆ

Now we can create blogs and publish it.

After that we need to check our database

now WordPress stores information in mydb database.

Finally our Task is completed successfully !!!!๐Ÿ˜„โœŒ๐Ÿป

Thanks for Reading !! ๐Ÿ™Œ๐Ÿป๐Ÿ˜๐Ÿ“ƒ

๐Ÿ”ฐ Keep Learning !! Keep Sharing !! ๐Ÿ”ฐ

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

4 Pillars of Object-Oriented Building

Beginnerโ€™s Guide to Web Hosting and Domain

Adding a New Font to ImageMagick

TrustAds Update May 2019: Announcing Sharing and Frequency Updates

Not Learning How to Program, But Learning How to Pirate

Serverless Edge-to-Cloud computing: the open source way

Counting Down and Up with Recursive Method in Ruby

HTTP Request what?!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adarsha Dinda

Adarsha Dinda

More from Medium

SOLIS Spotlight: Brett Claywell, Co-Founder of SOLIS

Introducing VirtuComics

Deds Updateโ€Šโ€”โ€Š4/21/22

Ded.so promotional graphic, showing examples of ghosts and a disk

Stardust.