Delete a Bitnami WordPress Production-Ready Stack deployment on AWS
: This guide assumes that you have already deployed a Bitnami WordPress Production-Ready Stack solution on AWS.
Take the following considerations into account when deleting your Bitnami WordPress Production-Ready Stack CloudFormation stack:
- Before deleting your WordPress Production-Ready deployment:
- Back up your data
- After deleting your WordPress Production-Ready deployment:
- Remove the associated Route53 hosted zone (optional)
- Remove the associated SSL certificate (optional)
The following sections will walk you through the necessary steps.
Back up your data
Before deleting your Bitnami WordPress Production-Ready Stack deployment, it’s recommended that you create backups of your database and application files to avoid data loss.
There are several options to backup your database and WordPress files, such as the Jetpack plugin or the backup tools offered by AWS.
Use the Jetpack plugin
Use AWS backup tools
The Bitnami WordPress Production-Ready Stack database is stored in an Amazon Aurora database while the Bitnami WordPress Production-Ready Stack files are stored and shared across the Bitnami WordPress Production-Ready Stack instances using a shared file system (Amazon EFS). Therefore, to back up your data, it is necessary to separately back up the database and the shared file system.
Create an Amazon Aurora database snapshot
By default, Amazon RDS snapshots are done periodically depending on the Amazon RDS (Aurora) configuration parameters defined when deploying the CloudFormation template. You can access the database snapshots from the Amazon RDS console.
To force a database snapshot before deleting your solution, follow these steps:
Browse to the Amazon RDS console
Choose the primary instance (with role “Writer”) for the Aurora database cluster.
Select the “Actions -> Take snapshot” menu item.
In the “Take DB Snapshot” dialog, enter a name for the snapshot in the “Snapshot Name” field and click the “Take Snapshot” button.
A snapshot of the database will now be created and saved.
Create an EFS file system backup
In this solution, the following content is stored in the shared file system:
- WordPress configuration file (wp-config.php)
- WordPress content directory (wp-content) with plugins, uploads, and themes files
- Apache configuration files
- PHP configuration files
AWS offers two different solutions for EFS backup: the AWS Backup service and the EFS-to-EFS backup solution. Refer to the AWS EFS backup documentation for detailed information and instructions.
Delete a Bitnami WordPress Production-Ready Stack deployment from the CloudFormation console, as follows:
Log in to the AWS CloudFormation console and select your stack.
Select the “Actions -> Delete Stack” menu item.
A confirmation message will be displayed. Click the “Yes, Delete” button.
Amazon Web Services will now begin the deletion process. This process may take some time, but you can use the CloudFormation dashboard to periodically check the status of the deletion.
Remove the Route53 hosted zone (optional)
: This section assumes that you created a hosted zone when launching Bitnami WordPress Production-Ready Stack as described in this tutorial.
Once you delete your Bitnami WordPress Production-Ready Stack deployment, you should delete the Route53 hosted zone created to manage the domain name for your Bitnami WordPress Production-Ready Stack site, as follows:
Access the Route53 console and select the hosted zone associated to your domain.
Click the “Delete Hosted Zone” button.
A confirmation message will be displayed. Review it and click the “Confirm” button.
Your hosted zone will now be deleted.
Remove the SSL certificate (optional)
: This section assumes that you set a domain name in the “DNS and SSL configuration” section when launching Bitnami WordPress Production-Ready Stack as described in this tutorial.
This solution uses an AWS Lambda function to automatically create an SSL certificate for the indicated domain name. Once you delete your Bitnami WordPress Production-Ready Stack deployment, you should delete the SSL certificate by following the steps below:
Log in to the AWS Certificate Manager console and select the SSL certificate associated with your domain.
Select the “Actions -> Delete” menu item.
Your SSL certificate will now be deleted.