Deploying WordPress On EC2 Instance Using AWS RDS
Hey guys hope you all are doing good in today's article we are going to see how to install WordPress on the aws ec2 instance using amazon image and for the database we will be using the rds service of aws.
First, go to AWS rds service and make SQL database instance with configuration shown below
Note:- For testing purpose, I have given public access and you can too give it but for production, it is not recommended.
Once the database instance is launched go to ec2 instance and make an instance of any specs according to your need here we are using ami(Amazon machine image).
Inside image run the following command
yum install httpd=> to install apache serversystemctl start httpd => to start the apache web serversystemctl enable httpd => to enable the apache web server
Once all this Is done go to the main folder of the server(html folder) download WordPress here using the following command
cd /var/www/html => to go to main server folder
wget https://wordpress.org/latest.tar.gz => to download wordpress
tar -xzvf latest.tar.gzcd => to unzip the wordpress
cd wordpress => to go inside the wordpres folder
mv wp-config-sample.php wp-config.php => to make the config file of Wordpress
vi wp-config.php => to edit the config file of wordpress
Now once this is done we have to update the PHP version in ami as that is a basic requirement of WordPress to install a new version of PHP using the following command
yum install -y amzon-linux-extras
yum install php-cli php-pdo php-fpm php-json php-mysqlnd
amzon-linux-extras | grep php
amazon-linux-extras enable php7.4
yum install php=> to install php
Once the PHP version is upgraded we are all set to configure our wp-config.
When you open the WordPress config file it will look like something as shown below.
In the above file, you have to edit your DB_name, DB_user, DB_password, DB_host(in DB host you can give your endpoint URL which is available under your database instance)
Guys, here we come to the end of this blog I hope you all like it and found it informative. If have any query feel free to reach me :)
Guys follow me for such amazing blogs and if have any review then please let me know I will keep those points in my mind next time while writing blogs. If want to read more such blog to know more about me here is my website link https://sites.google.com/view/adityvgupta/home.Guys Please do not hesitate to keep 👏👏👏👏👏 for it (An Open Secret: You can clap up to 50 times for a post, and the best part is, it wouldn’t cost you anything), also feel free to share it across. This really means a lot to me.