Skip to content

Instantly share code, notes, and snippets.

@danishbacker
Forked from Azrael808/circle.yml
Created June 25, 2017 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danishbacker/1f34c6f15d71fd2efa4b0244d80f450a to your computer and use it in GitHub Desktop.
Save danishbacker/1f34c6f15d71fd2efa4b0244d80f450a to your computer and use it in GitHub Desktop.
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