If you are trying to upload a WordPress site to OpenShift you will have to make the following adjustments to your wp-config.php file:

/** MySQL database username */
define(‘DB_USER’, $_ENV[‘OPENSHIFT_MYSQL_DB_USERNAME’]);

/** MySQL database password */
define(‘DB_PASSWORD’, $_ENV[‘OPENSHIFT_MYSQL_DB_PASSWORD’]);

This will help WordPress to use the environment variables that OpenShift setup to connect to MySQL.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.