Remote MySQL

After I finally got AWS up and running, I have another question.

I’ve manually set my endpoint under db_host:

The instructions for a normal wp-config.php install makes sense, un, pw, and host, and off we go. However, with trellis it’s a bit confusing.

Would you mind helping a bIt?

Sorry, I don’t folllow the question. You are asking how to connect to your MySQL datbase remotely? Are you talking about from the Bedrock installation, or from an app like Sequel Pro?

I’m talking using RDS instead of using mysql directly on the app server.

Check the trellis readme at the bottom

env - environment variables

And it’s nested variables

wp_home - WP_HOME constant (required)
wp_siteurl - WP_SITEURL constant (required)
wp_env - environment (required, matches group name: development, staging, production)
db_name - database name (required)
db_user - database username (required)
db_password - database password (required)
db_host - database hostname (default: localhost)
domain_current_site (required if multisite.enabled is true)

You need to set your DB_HOST, DB_USERNAME, and DB_PASSWORD as usual of course to match your RDS credentials.

Also set db_create to false. The main difference with a remote db is you need to make sure the database is already create outside of Trellis.

Note that some changes are coming to this workflow. See