Setting up your ec2 instance

Login to the ec2 instance terminal using putty.

We need to Install basic packages required for installing WordPress. (httpd, php, MySQL).

Run the following commands:

-- yum install httpd -y ( will install httpd package)

--yum install php-mysqlnd mysql -y (will install php and MYSQL)

--amazon-linux-extras install php7.3 (it will upgrade to php version 7.3)

 Now we will download WordPress version 5.1.1 which is supported with
this php version 7.3 .

So, to download and install WordPress version 5.1.1

--wget https://wordpress.org/wordpress-5.1.1.tar.gz

This version is supported with php version 7.1 to 7.3.

To unzip the WordPress file command is:

--tar -xzvf wordpress-5.1.1.tar.gz

Then , transfer files of wordpress directory into /var/www/html using command:

--cp -r wordpress/* /var/www/html

Now we need to start and enable httpd by running respective commands: 


--systemctl start httpd

 (to start httpd)

--systemctl enable httpd

(to enable httpd) 

To see wordpress api !! Type http://<instance_public_ip>/

Here it will ask for Database name , username , password , database host We already know username password and host .. So, First we need to create database….Let's do it in the next step.

 

Discussion

2

0