Search⌘ K
AI Features

Getting Started: Setting Up WordPress

Explore how to create and configure a WordPress instance on AWS using EC2. Learn to access the instance via SSH, verify its status, and retrieve the administrator credentials needed to manage your WordPress site effectively.

In this lesson, we’ll set up the WordPress instance we’ll work with in this chapter.

Creating a WordPress instance

Let’s first create a simple WordPress instance that we can log in to via SSH.

Shell
aws ec2 run-instances \
--image-id resolve:ssm:/aws/service/marketplace/prod-tdzx6newyhgcc/5.9.3-16-r08-on-debian-10 \
--instance-type t2.micro \
--tag-specifications 'ResourceType=instance,Tags=[{Key=team,Value=wordpress}]' 'ResourceType=volume,Tags=[{Key=team,Value=wordpress}]' \
--security-group-ids 'ssh-access' 'https-access' \
--key-name 'hello-wordpress'

This will start a WordPress instance based on the AWS Marketplace WordPress image from Bitnami (specified through the --image-id using an alias). The instance type will be t2.micro. We add some tags through --tag-specifications for both the instance and all volumes created for it. We attach the security groups ssh-access and https-access through the --security-group-ids parameter. ...