Skip to content

Instantly share code, notes, and snippets.

@BenBroide
Last active October 10, 2017 13:12
Show Gist options
  • Select an option

  • Save BenBroide/5d7a4b6de00015c7fab341460aac0efd to your computer and use it in GitHub Desktop.

Select an option

Save BenBroide/5d7a4b6de00015c7fab341460aac0efd to your computer and use it in GitHub Desktop.
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
Copy link
Copy Markdown
Author

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