Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Turn c9 WordPress workspace server "ON" and paste this bash code in the c9 ide terminal and click "enter"
#turn workspace server on ( "RUN" button), paste this into c9 terminal, and hit "enter"
SETUP_PATH="setup.sh"
cat >$SETUP_PATH <<'EOF'
#!/bin/bash
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp core install --url=https://$C9_HOSTNAME --title=QuickWP --admin_user=admin --admin_password=123456 --admin_email=$C9_EMAIL
wp option update my_option '{"site_url": "bar"}' --format=json
wp theme install twentyseventeen
wp scaffold child-theme twentyseventeen-child --parent_theme=twentyseventeen
wp core update
wp core update-db
#uncomment last 2 lines to install and activate plugins
#the plugin slug to install is the last part of plugin page in wp repo URL
#ex: https://wordpress.org/plugins/contact-form-7-to-database-extension --> contact-form-7-to-database-extension
plugins=(debug-bar query-monitor);
for i in ${plugins[@]}; do wp plugin install --activate $i; done
wp theme activate twentyseventeen-child
wp rewrite structure /%postname%/
c9 wp-content/themes/twentyseventeen-child/functions.php
EOF
chmod +x $SETUP_PATH
./$SETUP_PATH
rm $SETUP_PATH
phpmyadmin-ctl install
@BenBroide

This comment has been minimized.

Copy link
Owner Author

@BenBroide BenBroide commented Jan 17, 2017

Video and more info how to use here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment