Skip to content

Instantly share code, notes, and snippets.

@centminmod
centminmod / custom_config.inc
Last active December 16, 2022 19:54
Custom Config options available for Centminmod.
# CENTMINMOD CUSTOM CONFIGURATIONS OPTIONS FILE
# PLEASE NOTE: This file serves as a file with all the possible options, NOT what should be used in a production enviornment!!!!
# https://centminmod.com
# Creating a custom_config.inc file it will override default setting for upgrades and software installs.
# Location: /etc/centminmod/custom_config.inc
EMAIL='' # Server notification email address enter only 1 address
PUSHOVER_EMAIL='' # Signup pushover.net push email notifications to mobile & tablets
CMGIT='https://github.com/centminmod/centminmod.git'
@MikeNGarrett
MikeNGarrett / wp-config.php
Last active May 12, 2025 16:13
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
WordPress Emails

WordPress Emails

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

@webaware
webaware / wp-migrate-db-exclude-sessions.php
Last active June 29, 2018 19:19
Exclude WooCommerce sessions from WP Migrate DB Pro migration
<?php
/*
Plugin Name: WP Migrate DB Exclude Woo Sessions
Plugin URI: https://gist.github.com/webaware/17be2cb59f2cfe1313d6
Description: Exclude WooCommerce sessions from migration
Version: 0.0.1
Author: WebAware
Author URI: http://webaware.com.au/
*/
@salcode
salcode / .gitignore
Last active February 19, 2025 22:44
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@bekarice
bekarice / wc-change-return-to-shop-link.php
Last active August 8, 2023 19:30
Change WooCommerce return to shop URL
@mattclements
mattclements / vhost.conf
Last active April 14, 2018 17:58
Apache VHOST File
ServerName [% vhost.servername %]
[% IF vhost.serveralias_array.size -%]
[% FOREACH alias IN vhost.serveralias_array -%]
ServerAlias [% alias %]
[% IF alias == 'www.' _ vhost.servername -%]
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
[% END -%]
@anshula
anshula / phoronix-cmd.md
Last active June 28, 2025 06:33
Phoronix Test Suite Cheat Sheet
@webaware
webaware / htaccess-extras
Last active April 7, 2025 07:17
Here’s some basic recipe stuff to put into the top of .htaccess, above WP Super Cache and WordPress rules. Together, they reduce load on the server by compressing static files before sending them, making browsers cache static files, dying quickly on static files 404 errors, and blocking some common hacker / spammer attacks.
# v18 2025-04-07
# prevent listing files in folders
Options -Indexes
# some security rules
<IfModule mod_rewrite.c>
RewriteEngine On
# prevent php execution in uploads
RewriteRule /uploads/.*\.php - [F]
@webaware
webaware / register-link-remover.php
Last active June 27, 2022 08:55
Remove the register link from the WordPress wp-login.php script. See blog post: http://snippets.webaware.com.au/snippets/remove-register-link-wordpress-wp-login-php/