Integration of AWS EC2 with WordPress using AWS RDS !!!
Made by Pratik Kohad

Integration of AWS EC2 with WordPress using AWS RDS !!!

?? 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 !!!

No alt text provided for this image

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.

No alt text provided for this image

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:-

No alt text provided for this image

Step 1 -?First, we need to launch an ec2 instance on AWS.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Step 2 -?Now login to the EC2 instance.

To configure WordPress, we need to configure Apache WebServer.

  yum install httpd -y         
No alt text provided for this image
No alt text provided for this image

Step 3 -??Now install MYSQL.

No alt text provided for this image

Step 4 -??Now install php7.2



      amazon-linux-extras install php7.2 

        
No alt text provided for this image
No alt text provided for this image

Step 5 - Now Download WordPress



    wget https://wordpress.org/latest.tar.gz

        
No alt text provided for this image

Step 6 -?Now Extract the package.



     tar -xvzf latest.tar.gz -C  /var/www/html/

        
No alt text provided for this image
No alt text provided for this image

Let's Check!!!

No alt text provided for this image

Step 7 - Setting up the /etc/httpd/conf/ httpd.conf file

No alt text provided for this image

Making AllowOverride None to AllowOverride All

No alt text provided for this image

Step 8 - Setting Up the Amazon RDS instance.

No alt text provided for this image
No alt text provided for this image

Setting Up name and password for the instance to access

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

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

No alt text provided for this image

Let's Check!!!

No alt text provided for this image

Use the following command to open WordPress


<IP>/wordpress
        
No alt text provided for this image

after clicking on let's go it will direct you to the below page.

No alt text provided for this image

After clicking on submit you will be directed towards below page.

No alt text provided for this image

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

        
No alt text provided for this image


        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.

No alt text provided for this image

Now click on Run the installation as shown in the below screenshot

No alt text provided for this image

You will be directed to the below page where you will be allowed to put the name and password.

No alt text provided for this image
No alt text provided for this image

Step 12 - Click on Install WordPress and then you will be directed towards the below page.

No alt text provided for this image

Step 13 - Now log in using credentials entered before.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

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.??

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>

要查看或添加评论,请登录

Pratik Kohad ????的更多文章

社区洞察

其他会员也浏览了