Skip to content

Instantly share code, notes, and snippets.

View spicecadet's full-sized avatar

Edmund Turbin spicecadet

View GitHub Profile
@spicecadet
spicecadet / PANTHEON-DEPLOYMENT.md
Created June 4, 2026 13:21
Pantheon Drupal Deployment Pipeline for Bitbucket

Pantheon Deployment Pipeline Documentation

Overview

This Bitbucket pipeline automates Drupal site deployments to Pantheon using the official Pantheon Build Tools CI Docker image. The pipeline supports automatic deployments to Dev, pull request-based Multidev environments, and manual deployments to Test and Live.

Pipeline File

  • File: bitbucket-pipelines-pantheon.yml
  • Docker Image: quay.io/pantheon-public/build-tools-ci:8.x-php8.3
@spicecadet
spicecadet / README.md
Last active May 1, 2026 17:10
Pantheon Quicksilver Script for Multidev Creation with WordPress Multisites

Quicksilver Automation Script

This directory contains a Pantheon Quicksilver script that run automatically during platform workflows.

Multisite Domain Update (multisite-domain-update.php)

Purpose: Automatically updates WordPress Multisite domain configuration when creating multidev environments.

Trigger: Runs after creating new multidev environments (configured in pantheon.yml)

@spicecadet
spicecadet / .lando.yml
Last active May 3, 2024 10:28
Lando configuration for WordPress running on PHP 8.2/NGINX with MariaDB, Redis and Node. PHPMyAdmin and Mailhog are included and tooling supports WP-CLI and command line interaction through lando. To get this working copy the file your site directory and run: lando start. Run install-wp to install WordPress and then install WP as usual. For obje…
name: wp-nginx-redis
recipe: wordpress
config:
webroot: .
via: nginx
php: 8.2
xdebug: true
database: mariadb
@spicecadet
spicecadet / gist:71d65fab0480812bc66b09b69d056253
Created November 17, 2018 10:10
WP-CLI Get Production DB
#!/bin/bash
#get siteurl option from prod and dev
PROD_SITEURL=$(wp @prod option get siteurl);
DEV_SITEURL=$(wp @dev option get siteurl);
#Export database from prod and import to dev
wp @prod db export - > prod.sql
wp @dev db import /srv/www/edmund/prod.sql

Keybase proof

I hereby claim:

  • I am spicecadet on github.
  • I am spicecadet (https://keybase.io/spicecadet) on keybase.
  • I have a public key ASCC52FurGf2ViwJgzlK_AgtWUv73GE9xni_rser_gHULgo

To claim this, I am signing this object:

@spicecadet
spicecadet / 1. Codeship Deployment
Last active October 5, 2020 21:40
This is my deployment script for pushing from Github to a WP Engine WordPress install. The scripts below can be added as custom scripts to Codeship's Deployment Pipelines.
# Environment Variables
#INSTALL=
#EMAIL=
#ENVIRONMENT="production"
#SERVICE=
#ASSERTIBLE_CODE=
@spicecadet
spicecadet / backup.sh
Created October 7, 2015 16:47
This is a quick bash script I built to handle db export and docroot backup for my local vagrant box. Potentially useful if you are using a Vagrant box that does not backup files and db on Vagrant Destroy. Note that you'll need to add your password to run the copy command on line 31.
#! /bin/bash
# create variables for directories
main_backup_dir=$HOME/Development/backups
vagrant_dir=$HOME/Development/hgv/hgv_data
vagrant_root_dir=$HOME/Development/hgv
today="$(date +'%m-%d-%Y')"_daily_backup
daily_backup_dir=$HOME/Development/backup/$today
# print directories to screen for testing
echo ----------: Main backup dir: $main_backup_dir
@spicecadet
spicecadet / Gulpfile.js Example
Last active October 8, 2015 08:29
This is an example gulp workflow that I run locally which handles sass compiling, image optimization, minification and reloading.
// gulp plugins
var gulp = require('gulp');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var livereload = require('gulp-livereload');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var minify = require('gulp-minify-css');
var imageop = require('gulp-image-optimization');
var livereload = require('gulp-livereload');
@spicecadet
spicecadet / composer.json
Created September 1, 2015 14:00
Here's the composer file used in my demo during my talk at WordCamp Norrkoping
{
"name": "edmund.turbin/wordpress-starter",
"description": "This is a basic wordpress install with some changes to the wp-content and core file locations",
"type": "dev",
"license": "GPL",
"authors": [
{
"name": "Edmund Turbin",
"email": "edmund.turbin@wpengine.com"
}