In Part2 we will configure and launch our WordPress site.
We will be doing below steps,
- Edit the already created Security Group, to allow all traffic. This is not advisable, but we will do this to make our access between application tier and database tier simple.
- Modify our DB and attach the existing Security Group, which was originally created during EC2 instance creation. Again this is not advisable.
- Use our EC2 IP to configure WordPress site.
- In a real world scenario, we will create a VPC and place the Application tier inside a Public Subnet & DB tier in a Private Subnet.As this particular post is for beginners we will try to do as simple as possible.
Editing the Security Group.
- Go to Ec2 Instance and click on the security group, to edit the access.
Modify the RDS Security Group to add the above Security Group.
Go to RDS Console -> Database -> particularDB and click on modify and add the security group.
Now copy the EC2 instance’s IP and paste in the web browser to setup WordPress site, as below,
url = ‘<<IP>>/wp-admin/options.php’
Click on Let’s go! and enter the DB details. You can get all the required details from RDS console and copy your DB endpoint to paste in Database host.
After clicking on submit a wp-config.php content will be displayed. It is very important to copy the entire content of the text and paste in a notepad. SSH to EC2 instance and go to /var/www/html/ and create a new file wp-config.php and paste this content, save and exit. Then press on ‘Run the installation’ only after the file is successfully saved.
You will be taken to ‘WordPress Welcome’ page. Provide your Site Tile,username & password to connect to the WordPress site and then click on Install, which will take you to Success page with login details.
Enter the above Created Username & Password to login into your WordPress site.
Click on Vist Site to see your WordPress site with admin rights to edit your content.
Well done !!! now you have created your own WordPress Site.
In part-3, we will look into resolving common errors during WordPress site setup.