Skip to content

Instantly share code, notes, and snippets.

building things

Chuck Reynolds chuckreynolds

building things
Block or report user

Report or block chuckreynolds

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View RPC Pint List
chuckreynolds / Wordpress .HTACCESS file
Created Jun 25, 2009
Hardened .htaccess file for WP installs
View Wordpress .HTACCESS file
# canonical redirect to no www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# protect wp-config at all cost
<files wp-config.php>
Order deny,allow
deny from all
chuckreynolds / robots.txt
Last active Aug 17, 2019
Solid start Robots.txt for WordPress Sites. (HEADS UP: Make sure you're viewing the most recent version of this Gist)
View robots.txt
# robots.txt for wordpress
User-agent: *
Disallow: /cgi-bin/
Disallow: /trackback/
Disallow: /comment-page-*
Disallow: /?s=*
Disallow: /*.php$
chuckreynolds / Podcast Ping Services
Created Sep 24, 2009
Podcast Specific Pings for Wordpress
View Podcast Ping Services
chuckreynolds / Add-default-gravatar-wordpress.php
Created Jan 15, 2010
Adds a default Gravatar through functions.php to Wordpress
View Add-default-gravatar-wordpress.php
// Add a default Gravatar if user doesn't have one
if ( !function_exists('rYno_newgravatar') ) {
function rYno_newgravatar( $avatar_defaults ) {
$newgravatar = get_bloginfo('template_url').'/images/new-gravatar.gif';
$avatar_defaults[$newgravatar] = 'New Custom Gravatar';
return $avatar_defaults;
add_filter( 'avatar_defaults', 'rYno_newgravatar' );
View WP-debug-wpconfig.php
/** Debugging WP */
define('WP_DEBUG', true); //enable the reporting of notices during development - E_ALL
define('WP_DEBUG_DISPLAY', true); //use the globally configured setting for display_errors and not force errors to be displayed
define('WP_DEBUG_LOG', true); //error logging to wp-content/debug.log
define('SCRIPT_DEBUG', true); //loads the development (non-minified) versions of all scripts and CSS and disables compression and concatenation,
define('E_DEPRECATED', false); //E_ALL &amp; ~E_DEPRECATED &amp; ~E_STRICT
define('AUTOSAVE_INTERVAL', '300'); // Autosave interval
define('SAVEQUERIES', true); // Analyse queries
define('WP_POST_REVISIONS', false);
chuckreynolds / wp-tags-to-cats.sql
Last active Dec 14, 2015
SQL Query turn WordPress Tags into Categories
View wp-tags-to-cats.sql
UPDATE wp_term_taxonomy SET taxonomy='post_tag', parent=0 WHERE taxonomy='category';
chuckreynolds / wp-spam-proof-emails.php
Last active Dec 14, 2015
Automatically Spam Proof Emails on a WordPress Site
View wp-spam-proof-emails.php
function security_remove_emails($content) {
$pattern = '/([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})/i';
$fix = preg_replace_callback($pattern,
&quot;security_remove_emails_logic&quot;, $content);
return $fix;
function security_remove_emails_logic($result) {
return antispambot($result[1]);
chuckreynolds / wp-rem-comment-url.php
Created Feb 28, 2013
Remove WordPress Comment Form URL field. Had a client that needed the URL field gone from the comment forms primarily for spam and they just didn't need the extra data so we nuked it.
View wp-rem-comment-url.php
function vuurr_nuke_comment_url_field($fields) {
return $fields;
chuckreynolds / wp-login-logo-link.php
Created Feb 28, 2013
Change WordPress wp-login.php form header logo and link and title
View wp-login-logo-link.php
You can’t perform that action at this time.