Skip to content

Instantly share code, notes, and snippets.

# WP Config Settings
wp config set AUTOMATIC_UPDATER_DISABLED true
wp config set CORE_UPGRADE_SKIP_NEW_BUNDLED true
# Changing Site URL to https
wp option get siteurl | sed "s/http:/https:/g" | xargs -I {} wp option update siteurl {}
wp option get home | sed "s/http:/https:/g" | xargs -I {} wp option update home {}
# Install themes & plugins
@butchpage
butchpage / docker_wordpress.md
Last active April 4, 2023 19:14 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

Use this file to setup a test WordPress site, includes MySQL and PHPMyAdmin.

WordPress will load up on localhost:8000 PHPMyAdmin will load up on localhost:8080

# To Start
$ docker-compose up -d
@butchpage
butchpage / README.md
Created December 22, 2017 21:08 — forked from jamesramsay/README.md
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
@butchpage
butchpage / .gitignore
Created February 10, 2017 17:34
WordPress site .gitignore file
*.log
wp-config.php
wp-content/advanced-cache.php
wp-content/backup-db/
wp-content/backups/
wp-content/blogs.dir/
wp-content/cache/
wp-content/upgrade/
wp-content/uploads/
wp-content/wp-cache-config.php
@butchpage
butchpage / hide hidden files on mac osx
Created February 7, 2017 23:30
hide hidden files on mac osx
defaults write com.apple.finder AppleShowAllFiles NO
@butchpage
butchpage / Show hidden files on mac osx
Created February 7, 2017 23:28
show hidden files on mac osx
defaults write com.apple.finder AppleShowAllFiles YES
@butchpage
butchpage / sublime-text-terminal-alias
Last active February 5, 2017 06:00
Create Terminal / iTerm alias to open files with Sublime Text
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
@butchpage
butchpage / wp-config.php
Created December 20, 2014 20:08
WordPress: wp-config debug
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false );
define('SAVEQUERIES', true);
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
@butchpage
butchpage / machine-cpt.php
Created March 18, 2014 16:39
WordPress: machine custom post type
<?php
/* ------------------------------------------------------------------------ *
* Machine Custom Post Type
* ------------------------------------------------------------------------ */
/**
* Creates a new custom post type for sewing machines.
*
*/