Skip to content

Instantly share code, notes, and snippets.

View austinginder's full-sized avatar

Austin Ginder austinginder

View GitHub Profile
@austinginder
austinginder / mutlisite-to-single.sql
Last active April 11, 2017 22:46
Multisite export to single install
# Delete all orphans user meta in WordPress
DELETE FROM wp_usermeta
WHERE NOT EXISTS (
SELECT * FROM wp_users
WHERE wp_usermeta.user_id = wp_users.ID
);
# Remove multisite only columns in users
alter table wp_users drop column spam;
alter table wp_users drop column deleted;
<?php
/*
Plugin Name: Anchor Multisite Jetpack Control
Description: Auto activate and disable select Jetpack modules
Version: 1.0
Author: austinginder
Author URI: http://austinginder.com
Network: true
License: GPL2
*/
@austinginder
austinginder / gist:3813257
Created October 1, 2012 17:43
portion of the tp_mail.pl
# Now that we have sent the text part its time to send the attachment..
if ($MAIL{'ftype'} and $MAIL{'ahandle'})
{
print S "--$boundary1$n";
print "--$boundary1$n" if $MAIL{'debug'};
if ( $MAIL{'ftype'} =~ /^text/)
{
print S "Content-Type: $MAIL{'ftype'}; charset=us-ascii; name=\"$MAIL{'aname'}\"$n";
@austinginder
austinginder / php.ini
Created June 5, 2012 22:01
Define upload size in php.ini for Wordpress
post_max_size = 1024M
upload_max_filesize = 1024M
@austinginder
austinginder / config.ru
Created May 2, 2012 14:18 — forked from brookr/config.ru
Rackup file I use for running WordPress on Pow
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/
# added hackery to work around Wordpress issues - Patrick Anderson (patrick@trinity-ai.com)
# added rewrite for Wordpress multisite upload directory - Austin Ginder
# clearly this could be cleaner, but it does work
require 'rack'
require 'rack-legacy'
require 'rack-rewrite'
# patch Php from rack-legacy to substitute the original request so
@austinginder
austinginder / Wordpress featured images expanded
Created November 1, 2010 13:15
Wordpress adding multiple featured images per post