๐๐ง๐ญ๐๐ ๐ซ๐๐ญ๐ข๐จ๐ง ๐จ๐ ๐๐ฆ๐๐ณ๐จ๐ง ๐๐๐ ๐ฐ๐ข๐ญ๐ก ๐๐ฎ๐ฅ๐ญ๐ข-๐๐ข๐๐ซ ๐๐ฉ๐ฉ๐ฅ๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ซ๐๐๐ซ๐๐ฌ๐ฌ
๐ฐTask Description
๐
Create an AWS EC2 instance
๐
Configure the instance with Apache webserver.
๐ Download PHP application name WordPress.
๐ As WordPress stores data at the backend in the MySQL database server. Therefore we need to set up a MySQL server using AWS RDS service using Free tier.
๐ Provide the endpoint/ connection string to the PHP application to make it work
Amazon Relational Database Service (RDS)
The Amazon Relational Database Service (Amazon RDS) makes it easy to set up, manage, and scale a related database in the cloud. It provides affordable and resizable capabilities while automating time-consuming administration tasks such as hardware provisioning, database setup, patching, and backups. This allows you to focus on your applications so that you can give them the performance they need, higher availability, security, and compatibility.
WordPress
WordPress is a free and open-source content management system written in PHP and integrated with the MySQL or MariaDB database. Features include a plugin architecture and a template system that is referred to as themes in WordPress.
MySQL
MySQL is a Relational Database Management System (RDBMS) based on Open Source, Structured Query Language (SQL). MySQL is available on all major operating systems, including Windows, Linux, and Solari. It is for free use for individuals and unproductive environments under the GNU General Public License; However, if used commercially, a commercial license is required.
Letโs Beginโฆ
๐ Create an AWS EC2 instance
- Install Mysql
yum install mysql -y
2. Install PHP
amazon-linux-extras install php7.2 -y
3. Install httpd
yum install httpd -y
4. Install WordPress
5. Extract WordPress
tar -xzf latest.tar.gz
6. Moving WordPress folder to root directory /var/www/html
mv wordpress /var/www/html
7. Edit httpd configuration file
vim /etc/httpd/conf/httpd.conf
AllowOverride All
8. Start httpd service
systemctl start httpd
WordPress uses MySQL Database Server to store data. So we need to configure the database using the Amazon RDS service.
Carefully follow the steps below to create a free database.
Database Created Successfully โฆโฆ.!
Then we need to create MySQL Databases
CREATE DATABASE <database_name>;
Here I have created a database called mydb.
Now enter the public IP of EC2-instance in the browser
Browser Now
http://<public ip of ec2-instance>/wordpress
Here, we see that it is not possible to create the wp-config.php file
So, we need to create it manually โฆ
cat > /var/www/html/wordpress/wp-config.php
# and save the fileโฆ.
Restart httpd service
then go back to the browser โฆโฆ
Here we can see that our WordPress has been successfully installed โฆ
Now we are going to login to WordPress to create our website.