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

Sourav Dinda
4 min readApr 5, 2021

--

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

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

Amazon Relational Database Service (RDS)

The Amazon Relational Database Service (Amazon RDS) makes it easy to set up, manage, and scale a related database in the cloud. It provides affordable and resizable capabilities while automating time-consuming administration tasks such as hardware provisioning, database setup, patching, and backups. This allows you to focus on your applications so that you can give them the performance they need, higher availability, security, and compatibility.

WordPress

WordPress is a free and open-source content management system written in PHP and integrated with the MySQL or MariaDB database. Features include a plugin architecture and a template system that is referred to as themes in WordPress.

MySQL

MySQL is a Relational Database Management System (RDBMS) based on Open Source, Structured Query Language (SQL). MySQL is available on all major operating systems, including Windows, Linux, and Solari. It is for free use for individuals and unproductive environments under the GNU General Public License; However, if used commercially, a commercial license is required.

Letโ€™s Beginโ€ฆ

๐Ÿ”… Create an AWS EC2 instance

  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

WordPress uses MySQL Database Server to store data. So we need to configure the database using the Amazon RDS service.
Carefully follow the steps below to create a free database.

Database Created Successfully โ€ฆโ€ฆ.!

Then we need to create MySQL Databases

CREATE DATABASE <database_name>;

Here I have created a database called mydb.
Now enter the public IP of EC2-instance in the browser

Browser Now

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

Here, we see that it is not possible to create the wp-config.php file
So, we need to create it manually โ€ฆ

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

Restart httpd service

then go back to the browser โ€ฆโ€ฆ

Here we can see that our WordPress has been successfully installed โ€ฆ
Now we are going to login to WordPress to create our website.

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

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

--

--

Sourav Dinda
Sourav Dinda

No responses yet