Configuring WordPress using ec2, RDS.
WordPress is a popular and user-friendly platform for building websites and blogs. It’s like a toolbox for creating and managing your website without needing to know how to code.
Imagine WordPress as a blank canvas where you can paint your website. It provides you with pre-made templates (called themes) that determine how your site looks. You can also add different tools and features to your site by installing plugins, kind of like adding apps to your phone.
Step1: Creating an ec2 instance:
Go to the EC2 Dashboard.
Click on the “Launch Instance” button.
- Choose an Amazon Machine Image (AMI) for your EC2 instance. You can use Amazon Linux or any other suitable Linux distribution.
- Select an instance type. You can start with the t2.micro instance, which is eligible for the AWS Free Tier.
- Configure the instance details as per your requirements, including network settings, security groups, and tags.
- Review the instance configuration and launch it, creating or selecting an existing key pair to connect securely to your instance.
Step2: Connect to Your EC2 Instance:
Note: Here the ip is not the same everywhere as you see in this entire article. It keeps on changing since it is a public ip and we havent fixed that ip.
Step 3: Install Apache web server with php and WordPress:
Step 4: Set Up AWS RDS MySQL Database
Step5: Configure WordPress to Use RDS
- Now, lend towards ec2 instance and run the cmd below
- cmd: vi /var/www/html/wordpress/wp-config.php
- In that configuration part edit these details. These are the details we used while creating rds service.
define(‘DB_NAME’, ‘your-db-name’);
define(‘DB_USER’, ‘your-db-username’);
define(‘DB_PASSWORD’, ‘your-db-password’);
define(‘DB_HOST’, ‘your-rds-endpoint’);
- rds endpoint link can be fetched in rds database dashboard.
Step 5: Finish WordPress Installation:
- Open the link : http://18.60.142.242/wp-admin/install.php
- In your case ip might be different, mine too keeps on changing since I havent done everything on one go.
- In the next page the page asks for site title, username, password etc.
- Then click on install. WordPress would be successfully installed.
- Now you can create post, blogs etc.
Thank you🤗🤗