Skip to content

Instantly share code, notes, and snippets.

@anwas
Last active November 10, 2021 11:35
Show Gist options
  • Save anwas/e72efd297da191fa057ee0fb2bcccdae to your computer and use it in GitHub Desktop.
Save anwas/e72efd297da191fa057ee0fb2bcccdae to your computer and use it in GitHub Desktop.
[WordPress wp-config customization]
<?php
/* WordPress debug mode for developers. */
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', false );
// The SAVEQUERIES definition saves the database queries to an array and that array can be displayed to help analyze those queries.
// The array is stored in the global $wpdb->queries.
define( 'SAVEQUERIES', false );
/* SSL */
define( 'FORCE_SSL_LOGIN', true );
define( 'FORCE_SSL_ADMIN', true );
/* Media Trash. */
define( 'MEDIA_TRASH', true );
/*
Multisite. */
// define( 'WP_ALLOW_MULTISITE', true );
/*
PHP Memory */
// define( 'WP_MEMORY_LIMIT', '128' );
// define( 'WP_MAX_MEMORY_LIMIT', '512' );
/*
WordPress Cache */
// define( 'WP_CACHE', true );
/* Compression */
define( 'COMPRESS_CSS', true );
define( 'COMPRESS_SCRIPTS', true );
define( 'CONCATENATE_SCRIPTS', true );
define( 'ENFORCE_GZIP', true );
/* FTP */
switch ( gethostname() ) {
case 'v3':
case 'eb':
define( 'FTP_USER', 'USER' );
define( 'FTP_PASS', 'PSWD' );
define( 'FTP_HOST', '127.0.0.1' );
define( 'FTP_SSL', false );
break;
case 'its-an':
case 'its-eb':
define( 'FTP_USER', 'USER' );
define( 'FTP_PASS', 'PSWD' );
define( 'FTP_HOST', '127.0.0.1' );
define( 'FTP_SSL', false );
break;
case 'devs':
case 'code':
define( 'FTP_USER', 'USER' );
define( 'FTP_PASS', 'PSWD' );
define( 'FTP_HOST', '127.0.0.1' );
define( 'FTP_SSL', false );
break;
}
/* Updates */
define( 'WP_AUTO_UPDATE_CORE', true );
define( 'DISALLOW_FILE_MODS', false );
define( 'DISALLOW_FILE_EDIT', true );
/* Cleanup Image Edits */
define( 'IMAGE_EDIT_OVERWRITE', true ); // https://deliciousbrains.com/undefined-define-image_edit_overwrite/
/* Query Monitor constants */
define( 'QM_ENABLE_CAPS_PANEL', true );
define( 'JETPACK_STAGING_MODE', true );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment