Search⌘ K

Saving Your State

Explore how to save your WordPress instance state by creating a custom AMI on AWS. Learn to reset, stop, and create an AMI from your EC2 instance, then use the AWS CLI to build launch templates for consistent and scalable WordPress deployments. This lesson equips you with the skills to make your WordPress setup reusable and easily reproducible in the cloud.

In the last lesson, we set up the configuration of our WordPress instance such that we can pass the DB_* parameters from the outside via the EC2 user data. But right now, we’ve only applied this to one instance, and it isn’t reusable.

Using AMIs to save state

To make it reusable and reproducible, we’ll learn to create an AMI from the instance and how to reuse this AMI to recreate the modified WordPress instance in a reproducible way. Afterward, we will see how we can create a launch template with this new AMI to recreate our WordPress instance with one CLI command (or a few clicks on the AWS Console).

Because we haven’t terminated the instance in the last lesson, it should still be running and accessible.

Before we create the AMI, we once again need ...