This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
<?php | |
/** | |
* Class LocalValetDriver | |
* | |
* This class demonstrates how we might go about proxying any missing local images to a remote host. i.e; the production | |
* site. This has been created with WordPress in mind but could be adjusted to work with any other system. | |
*/ | |
class LocalValetDriver extends WordPressValetDriver { |
sites | |
|__ ms.dev | |
| |__ content | |
| |__ index.php | |
| |__ wp => ../../wordpress/stable | |
| |__ wp-config.php | |
|__ one.dev | |
| |__ content | |
| |__ index.php | |
| |__ wp => ../../wordpress/stable |
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, curl wget, rsync, git, subversion and composer. | |
# | |
# WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
# The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |
<?php | |
$path = str_replace( $_SERVER['DOCUMENT_ROOT'], '', dirname( $_SERVER['SCRIPT_FILENAME'] ) ); | |
$path_parts = explode( '/', $path ); | |
while ( count( $path_parts ) > 0 ) { | |
$path = $_SERVER['DOCUMENT_ROOT'] . implode( '/', $path_parts ) . '/wp-config.php'; | |
if ( file_exists( $path ) ) { | |
include( $path ); | |
break; | |
} else { | |
array_pop( $path_parts ); |
# Automatically instal the latest nginx | |
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
#Make a backup copy of your current sources.list file | |
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
#Now copy the following repositories to the end of ` /etc/apt/sources.list` | |
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list |
Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
# Apache .htaccess | |
RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1 | |
# Nginx | |
location ~ ^/wp-content/uploads/(.*) { | |
rewrite ^/wp-content/uploads/(.*)$ http://livewebsite.com/wp-content/uploads/$1 redirect; | |
} |
<?php /* | |
************************************************************************** | |
Plugin Name: Generate Thumbnails On The Fly | |
Description: When a thumbnail image is requested of a specific width/height (rather than by name), generate it if it doesn't exist. | |
Version: 1.0.0 | |
Author: Alex Mills (Viper007Bond) | |
Author URI: http://www.viper007bond.com/ |