Installing wordpress on EC2

  1. After connecting EC2 instance successfully. You will take the following steps to prepare to deploy the application:
  • Install httpd service by copying the following command:
sudo yum install -y httpd

install-wordpress

  • Install php-mysql
sudo yum install php-mysql -y

install-wordpress

  • Install php7.3
sudo amazon-linux-extras install -y php7.3

install-wordpress

Move the directory to where wordpress executes to download and install

$ cd /var/www/html/
$ ls

install-wordpress

  • Download and install wordpress
$ wget https://wordpress.org/latest.tar.gz
$ tar -xzf latest.tar.gz

install-wordpress

  • Check download and extract results
$ ls

install-wordpress

  • Move into wordpress folder and check
$ cd wordpress
$ ls

install-wordpress

Open a web browser to access the public ipv4 dns address of the ec2 webserver

  • Copy ipv4 dns public

install-wordpress

  • Open browser with Public ipv4 dns and add /wordpress/wp-admin/setup-config.php

install-wordpress

Set up basic parameters for wordpress

  • Database Name: awsuser (Name of previously created database)
  • Username: admin
  • Password: dbpassword
  • Database Host: Your Endpoint Database
  • Table Preflix: wp_

install-wordpress

After submitting

install-wordpress

Rename the file wp-config-sample.php to file wp-config.php

$ mv wp-config-sample.php wp-config.php

install-wordpress

Delete the data in the wp-config.php file and copy the information in the previous step into the wp-config.php file.

$ cat > wp-config.php
$ nano wp-config.php

install-wordpress

Select run the installation to proceed to the next step

install-wordpress

After the installation is complete, login to wordpress admin

install-wordpress

Successfully logged in to the wordpress dashboard interface

install-wordpress