For those users who use cPanel/WHM on their virtual or dedicated servers the following article describes common system paths and utilities.
PHP
/usr/bin/php
WP Bag of Tricks | |
1. Helpful Scripts/Plugins: | |
Hacks: | |
http://wordpress.org/extend/plugins/tac/ | |
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.) | |
http://wordpress.org/extend/plugins/wp-malwatch/ |
# SeniorDev, AwesomeDev, NoviceDev | |
class SeniorDev | |
def do_some_old_stuff | |
puts "This is a piece of cake" | |
end | |
def method_missing(name, *args) | |
puts "Err.. What? #{name}??.. THAT IS IMPOSSIBLE! Leave me alone." | |
end |
<?php | |
/* | |
* Plugin Name: WPMU Power Tools | |
* Plugin URI: http://plugins.paidtoblog.com/wpmu-power-tools/ | |
* Description: A few powerfull tools that every WPMU Admin should have. | |
* Author: Brian Freeman (aka MrBrian) | |
* Version: 0.7 | |
*/ | |
/* Some sample snippet codes for PHP Executor (feel free to send in yours) |
<?php | |
/* | |
Plugin Name: Force SSL URL Scheme | |
Plugin URI: https://gist.github.com/webaware/4688802 | |
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work | |
Version: 1.0.0 | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
@ref: http://wordpress.org/support/topic/ssl-insecure-needs-35-compatibility |
Open the find/replace dialog. | |
At the bottom will be some Search mode options. Select "Extended (\n \r \t \0 \x...)" | |
In either the Find what or the Replace with field entries, you can use the following escapes: | |
\n new line (LF) | |
\r carriage return (CR) | |
\t tab character | |
\0 null character | |
\xddd special character with code ddd |
<?php | |
/* | |
Plugin Name: Debug Log Not Strict | |
Plugin URI: https://gist.github.com/webaware/6520892 | |
Description: Turn on WP_DEBUG_LOG but without E_STRICT | |
Version: 1.4.0 | |
Author: WebAware | |
Author URI: https://shop.webaware.com.au/ | |
*/ |
<?php | |
/* | |
Plugin Name: WP Migrate DB Fix Options | |
Plugin URI: https://gist.github.com/webaware/6959279 | |
Description: Fix some options after a WP Migrate DB Pro migration, back to dev/test mode | |
Version: 1.0.0 | |
Author: WebAware | |
Author URI: http://www.webaware.com.au/ | |
@ref: http://snippets.webaware.com.au/snippets/use-wp-migrate-db-pro-and-keep-your-development-environment-settings |
A little explanation for those who have no idea what NOBLOGREDIRECT is. | |
The define(‘NOBLOGREDIRECT’, ‘%siteurl%’); inside of the wp-config.php makes it so that when someone enters a subdomain that does not exist on your site to redirect to whatever url you wish it to. You can use this to have it either go to a specific FAQ page or directly back to the main root installation, anywhere you want to direct it. the %siteurl% can be replaced for example define(‘NOBLOGREDIRECT’, ‘http://frumph.net/FAQ/site-create’); | |
When someone in their browser tries to go to (for example) http://badsubdomain.frumph.net/ a subomain which doesn’t exist, it will go to what is defined in NOBLOGREDIRECT. | |
Without using NOBLOGREDIRECT the (for example) http://badsubdomain.frumph.net/ – which is a subdomain that doesn’t exist would direct to the signup page asking which reports whether or not the user can create the bad subdomain in question. This is fine, there’s nothing wrong with it redirecting to the signup page if someone put |
server { | |
server_name domain1.com www.domain1.com domain2.com www.domain2.com; | |
# ngx_pagespeed & ngx_pagespeed handler | |
include /usr/local/nginx/conf/pagespeed.conf; | |
include /usr/local/nginx/conf/pagespeedhandler.conf; | |
include /usr/local/nginx/conf/pagespeedstatslog.conf; | |
access_log /home/nginx/domains/domain1.com/log/access.log combined buffer=32k; | |
error_log /home/nginx/domains/domain1.com/log/error.log; |