Guide: Create an AWS EC2 instance and set up a MySQL server using the AWS RDS service, Connection to the WordPress application.
Case :
?? Create an AWS EC2 instance.
?? Configure the instance with Apache Webserver.
?? Download php application name “WordPress”.
?? WordPress stores data at the backend in the MySQL Database server. Therefore, you need to set up a MySQL server using AWS RDS service using Free Tier.
?? Provide the endpoint/connection string to the WordPress application to make it work.
Let’s dive into each step in more detail:
This guide outlines a step-by-step process to establish a robust web infrastructure on Amazon Web Services (AWS).
It covers the creation of an EC2 instance, the setup of a MySQL server utilizing AWS RDS, and the integration of a WordPress application.
Following these steps will enable you to deploy a functional website with scalable and reliable database services, leveraging the power of AWS’s cloud computing capabilities.
Here, I have made Amazon Linux as AMI,
Note: I have used Amazon Linux 2 AMI, as some other AMI may not be yum and dependencies configured. You might not be able to install the software later in some cases
Review your settings and click “Launch”.
Get the required Software, in the Linux
Required Softwares:
yum install php httpd mysql -y
amazon-linux-extras install php7.2 -y
wget https://wordpress.org/latest.tar.zip
#to unzir tar file
tar -xzvf latest.tar.zip
# cp command to copy files from one path to another path
cp -r wordpress/* /var/www/html
chmod -R 755 *
chown -R apache:apache *
systemctl restart httpd
systemctl eneble httpd
领英推荐
Step 2: Set Up AWS RDS (MySQL)
Navigate to RDS:
Select Engine:
DB identifier: Database-1 will be created, it may take a while to get the endpoints.
If this issue occurs try the below,
Now we need to make some changes inside httpd config file
Now we have the page to connect to RDS credentials.
That’s it! You’ve now set up an AWS EC2 instance, configured a MySQL server using RDS, and connected it to a WordPress application.
Thank you for reading!!!!!