Integration of AWS EC2 with WordPress using AWS RDS !!!
Pratik Kohad ????
SIH Grand Finalist 2020 || MLops || ARTH Ambassador and Learner at LinuxWorld Informatics Pvt. Ltd
?? Task Description ??
???Create an AWS EC2 instance.
???Configure the instance with Apache Web Server.
???Download PHP application name “WordPress”.
???As WordPress stores data at the back-end MySQL Database server. Therefore, you need to set up a MySQL server using the AWS RDS service using Free Tier.
???Provide the endpoint/connection string to the WordPress application to make it work.
This is an important article on WordPress and Amazon RDS. In this article,?I have configured the instance with Apache Webserver on Amazon Linux O.S on AWS cloud and also configured MySQL server using AWS RDS service using Free Tier.
Let's Dive in !!!
What is WordPress?
At its core,?WordPress?is a free, open-source website creation platform. WordPress is a content management system (CMS) written in PHP that uses a MySQL database. WordPress is the easiest and most powerful blogging and website builder.?A?content management system?is basically a tool that makes it easy to manage important aspects of your website – like content – without needing to know anything about programming.WordPress is the simplest, most popular way to create your own website or blog.?In fact, WordPress powers?over 40%?of all the websites on the Internet. Yes – more than one in four websites that you visit are likely powered by WordPress.
On a slightly more technical level, WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free.
What is Amazon RDS?
The Amazon Relational Database Service (Amazon RDS) is a managed?SQL database service provided by Amazon Web Services that makes it easier 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.
Amazon RDS supports an array of database engines to store and organize data and helps with database management tasks, such as?Migration,?backup, recovery, and?patching.
So, here we start with our task:-
Step 1 -?First, we need to launch an ec2 instance on AWS.
Step 2 -?Now login to the EC2 instance.
To configure WordPress, we need to configure Apache WebServer.
yum install httpd -y
Step 3 -??Now install MYSQL.
Step 4 -??Now install php7.2
amazon-linux-extras install php7.2
Step 5 - Now Download WordPress
wget https://wordpress.org/latest.tar.gz
Step 6 -?Now Extract the package.
tar -xvzf latest.tar.gz -C /var/www/html/
Let's Check!!!
Step 7 - Setting up the /etc/httpd/conf/ httpd.conf file
Making AllowOverride None to AllowOverride All
Step 8 - Setting Up the Amazon RDS instance.
领英推荐
Setting Up name and password for the instance to access
Step 8 - Now connect to the database using following command.
mysql -h <endpoints of RDS INSTANCE> -u admin -p
Step 9 - exiting from MySQL
Step 10 - Starting Httpd using CLI
Let's Check!!!
Use the following command to open WordPress
<IP>/wordpress
after clicking on let's go it will direct you to the below page.
After clicking on submit you will be directed towards below page.
Copy the content from here and paste it into the wp-config.php file.
Step 11 - Copying content from WordPress to wp-config.php file
cat command allows us to create single or multiple files, view contain the file, concatenate files, and redirect output in terminal or files.
cat > /var/www/html/wordpress/wp-config.php
cat /var/www/html/wordpress/wp-config.php
here cat command is used to see the content which is copy-pasted in the above command.
Now click on Run the installation as shown in the below screenshot
You will be directed to the below page where you will be allowed to put the name and password.
Step 12 - Click on Install WordPress and then you will be directed towards the below page.
Step 13 - Now log in using credentials entered before.
So our WordPress Application is Successfully Deployed.
Hence, we have successfully completed the task.
Thanks for Reading the article !!! ????????
Hope you might find this article helpful!!!!
You can appreciate the article by giving it a like and posting comments about your feedback.
Feel free to ask any queries. Don’t forget to share this article with your colleagues.??
analyst in tcs
3 年The blog you shared is very good. I expect more information from you like this blog. Thank you. <a href="https://www.kellytechno.com/Hyderabad/Course/amazon-web-services-training">AWS Training In Hyderabad</a>