Convert MySQL connection string to WordPress wp-config.php parameters

If you work with SaaS services like Heroku or Amazon AWS / RDS / Aurora, it’s common to receive a connection string rather than a neatly divided variable for database host, port etc. With the snippet below you can convert a database string into the correct WordPress wp-config.php parameters.

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.