𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐭𝐢𝐨𝐧 𝐨𝐟 𝐀𝐦𝐚𝐳𝐨𝐧 𝐑𝐃𝐒 𝐰𝐢𝐭𝐡 𝐌𝐮𝐥𝐭𝐢-𝐓𝐢𝐞𝐫 𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐖𝐨𝐫𝐝𝐏𝐫𝐞𝐬𝐬
🔅 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 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 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.
🔅 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.
- 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
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
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
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