Deploy Wordpress With Amazon RDS

AWS RDS

Steps to deploy wordpress

  1. Launch an instance with the security group configured (allow port 80 and 22 with known ip)
  2. Create mysql database with RDS attach security which allow 3306 port
  3. Configure RDS database
  4. Configure wordpress in EC2
  5. Explore the new site

1. Launch instance

2. Creating MySql Database with RDS

3. Configure RDS Database

$sudo yum install mysql -y
export MYSQL_HOST=<your-endpoint>
mysql --user=<user> --password=<password> wordpress
CREATE USER 'wordpress' IDENTIFIED BY 'wordpress-pass';
GRANT ALL PRIVILEGES ON wordpress.* TO wordpress;
FLUSH PRIVILEGES;
Exit

4. Configure Wordpress

sudo yum install -y httpd
sudo service httpd start
$wget https://wordpress.org/latest.tar.gz
$tar -xzf latest.tar.gz
$ ls
latest.tar.gz wordpress
$cd wordpress
$cp wp-config-sample.php wp-config.php
unique pharse
sudo amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2
cd /home/ec2-user
sudo cp -r wordpress/* /var/www/html/
sudo service httpd restart

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store