Wordpress is a popular open source CMS written in PHP. People use Wordpress for everything from blogs, business websites, and portfolios to full-fledged e-commerce and news outlet solutions.
Required variables
WORDPRESS_DB_HOST
: The hostname of your MySQL/MariaDB database e.g.db.us-east-2.rds.amazonaws.com
WORDPRESS_DB_NAME
: The database nameWORDPRESS_DB_USER
: The name of the user for database authenticationWORDPRESS_DB_PASSWORD
: The password for database authentication
Getting started
After your app has finished deploying, open its URL in your browser. This will take you to a Wordpress installation page.
Due to how Wordpress is configured, the Wordpress app works best with Custom Domains. That said, if you'd rather use the CloudFront domain or the *.flexstack.app
domain, you should update your WORDPRESS_CONFIG_EXTRA
variable to something like below so that Wordpress can use the correct host name.:
Using RDS for your database
To use RDS as your Wordpress database, use an existing FlexStack Environment or create a new scratch environment.
1. In the AWS Console, switch the Region where your environment is hosted (e.g. us-west-2) and then head over to the RDS console.
2. Click "Create database"
3. Select "MariaDB" as the engine
4. Choose the "Free tier" template
5. Change the DB instance identifier to "wordpress" and add a master password. You can create a secure password by typing openssl rand -base64 24 | sed "s/[\/+]//g"
into your terminal app.
6. Under the "Connectivity" section, select "Dual-stack mode" and your environment's VPC. You can find the ID of your environment in your environment settings.
7. Choose the FlexStack-Database-[ENVIRONMENT_ID]
security group in the "Existing VPC security groups dropdown". Then select the first availability zone in the "Availability Zone" dropdown.
8. Open "Additional configuration" and set "Initial database name" to "wordpress" or similar
9. Click "Create database"
10. When your database has provisioned, its endpoint will be available under "Connectivity & security".
The above settings map to these environment variables:
Setting | Environment variable |
---|---|
Endpoint | WORDPRESS_DB_HOST |
Master username | WORDPRESS_DB_USER |
Master password | WORDPRESS_DB_PASSWORD |
Initial database name | WORDPRESS_DB_NAME |
Trademark notice
Wordpress is a registered trademark of The WordPress Foundation. Any rights therein are reserved to The WordPress Foundation. Any use by FlexStack is for referential purposes only and does not indicate any sponsorship, endorsement, or affiliation between The WordPress Foundation.