Welcome in the next post in the WordPress series.
Today I will continue with WordPress article series.
In a previous post https://www.funwithcloud.com/install-lemp-stack-on-ubuntu-linux/ I described how to create a fully working LEMP stack on Ubuntu.
In this post we will stick to WordPress being hosted on Linux EC2 virtual machine, but we will use an external database. I already created a Ubuntu based EC2 instance which is up and running.
![Install MySQL Database in AWS 1]
Create Database in AWS
- Login to AWS console.
- Once logged in navigate to services menu and choose Amazon RDS. ![Install MySQL Database in AWS 2]
- Click Create databse.
- Now you can choose between Standard Create or Easy Create. The difference between those two is simply more advanced configuration options for the database. I will choose Easy Create. You can choose something else for production deployment.
- Choose engine. MySQL or MariaDB. Both will work fine with WordPress.
- I’ve selected MySQL with Free Tier to avoid any extra costs. ![Install MySQL Database in AWS 3]
- Enter the name for the WordPress database alongside with username and password. ![Install MySQL Database in AWS 4]
- As this is a test deployment we are fine with Burstable class of our database. ![Install MySQL Database in AWS 5]
- Choose apropriate databse size. Default 20 GiB is more than enought for a WordPress instance. ![Install MySQL Database in AWS 6]
- We use burstable database so we kind of can’t change anything in Availability & durability section :).
- I think this might be the most important part of the deployment so far. We have to choose following settings:
- Default VPC
- Subnet group
- Publicly accessible - 99% choose no
- VPC Security Group
- Database port ![Install MySQL Database in AWS 7]
- Once finished click the button to create a database.
- After some time your database will be created and you will see a notification to check the credentials. ![Install MySQL Database in AWS 8]
- Click the notification and note your username, password and database endpoint. ![Install MySQL Database in AWS 9]
Configure WordPress with AWS Database
- One additional step is to connect from our EC2 instance to RDS Database and create database.
sudo mysql -h your.endpoint.us-west-2.rds.amazonaws.com -u YOURUSERNAME –p
Once connected simply create new database with this command
create database wordpressdb;
- Once we have all the necessary information we can configure WordPress wp-config.php file.
- We need to enter previously noted username, password and database endpoint. ![Install MySQL Database in AWS 11]
- If the configuration is fine you should see the WordPress installation prompt. ![Install MySQL Database in AWS 12] : /uploads/2019/09/install-mysql-in-aws-1.png : /uploads/2019/09/install-mysql-in-aws-2.png : /uploads/2019/09/install-mysql-in-aws-3.png : /uploads/2019/09/install-mysql-in-aws-4.png : /uploads/2019/09/install-mysql-in-aws-5.png : /uploads/2019/09/install-mysql-in-aws-6.png : /uploads/2019/09/install-mysql-in-aws-7.png : /uploads/2019/09/install-mysql-in-aws-8.png : /uploads/2019/09/install-mysql-in-aws-9.png : /uploads/2019/09/install-mysql-in-aws-10.png : /uploads/2019/09/install-mysql-in-aws-11.png : /uploads/2019/09/install-mysql-in-aws-12.png
- Google Cloud Platform - Unable to push Docker Image
- Create Azure Kubernetes Service using Service Principal Name
- Google Cloud Platform Interview
- Microsoft Azure Interview
- Amazon Web Services Interview
- Install LEMP stack on Ubuntu Linux
- Deploy WordPress in Microsoft Azure using Marketplace
- Deploy WordPress in Google Cloud Platform using Marketplace
- Install WordPress in Amazon Web Services using Marketplace
- New blog series is coming – How to install WordPress in Public Cloud