Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CircleCI: Automatically Deploy WordPress to Elastic Beanstalk
machine:
<machine_config>
dependencies:
pre:
- pip install awsebcli
- <other_project_dependencies>
database:
<database_setup>
test:
<test_config>
deployment:
production:
branch: master
commands:
- mv wp-config.aws.php wp-config.php
- zip -r bundle.zip ./* .htaccess .ebextensions
- eb init --region <region_identifier> <eb_application_name>
- eb deploy --staged --region <region_identifier> --label CircleCI-Build-${CIRCLE_BUILD_NUM} <eb_environment_name>
deploy:
artifact: bundle.zip
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://codex.wordpress.org/Editing_wp-config.php
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', $_SERVER['RDS_DB_NAME']);
/** MySQL database username */
define('DB_USER', $_SERVER['RDS_USERNAME']);
/** MySQL database password */
define('DB_PASSWORD', $_SERVER['RDS_PASSWORD']);
/** MySQL hostname */
define('DB_HOST', $_SERVER['RDS_HOSTNAME']);
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
... <rest of your WordPress configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.