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.
Create Database in AWS
- Login to AWS console.
- Once logged in navigate to services menu and choose Amazon RDS.
- 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.
- Enter the name for the WordPress database alongside with username and password.
- As this is a test deployment we are fine with Burstable class of our database.
- Choose apropriate databse size. Default 20 GiB is more than enought for a WordPress instance.
- 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
- 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.
- Click the notification and note your username, password and database endpoint.
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.
- If the configuration is fine you should see the WordPress installation prompt.
- 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