Skip to content

Instantly share code, notes, and snippets.

@oliwa
Last active June 7, 2024 13:13
Show Gist options
  • Save oliwa/7fd6086995b22122ccc4 to your computer and use it in GitHub Desktop.
Save oliwa/7fd6086995b22122ccc4 to your computer and use it in GitHub Desktop.
wp_config.php Template
<?php
define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
// salt security keys, see https://api.wordpress.org/secret-key/1.1/salt/
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');
// database table prefix
$table_prefix = 'wp_';
// language
define ('WPLANG', 'de_DE');
/* Versionierung */
define('WP_POST_REVISIONS', false);// Versionierung komplett deaktivieren
// only disable updating of the wp.content folder, i.e. no themes and default plugins like akismet and hello dolly
define( 'CORE_UPGRADE_SKIP_NEW_BUNDLED', true );
// Aktualisierungen
define('FS_METHOD', 'direct');
// oder FTP
// define('FTP_HOST', 'ftp.example.org');
// define('ftp_user', 'username');
// define('FTP_PASS', 'password');
// deactivate loading of CF7 scripts
define('WPCF7_LOAD_JS', false);
define('WPCF7_LOAD_CSS', false);
// define( 'WPCF7_USE_REALLY_SIMPLE_CAPTCHA', true );
// force SSL Admin
// define('FORCE_SSL_ADMIN', true);
// debug mode
// define( 'WP_DEBUG', true );
// define( 'WP_DEBUG_LOG', true );
// define( 'WP_DEBUG_DISPLAY', true );
/* Compress All CSS Files */
define( 'COMPRESS_CSS', true );
/* Compress All JS Files */
define( 'COMPRESS_SCRIPTS', true );
/* Turn On GZIP Compression */
define( 'ENFORCE_GZIP', true );
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
?>
@oliwa
Copy link
Author

oliwa commented Jan 15, 2018

/* Reduce a database call by setting site home and URL */
define( 'WP_HOME', 'https://xyz.com' );
define( 'WP_SITEURL', 'https://xyz.com' );

/* Increase PHP memory available to WordPress */
define( 'WP_MEMORY_LIMIT', '96M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

/* Protect default WordPress security permissions */
define( 'FS_METHOD', 'direct' );
define( 'FS_CHMOD_FILE', 0644 );
define( 'FS_CHMOD_DIR', 0755 );

/* Force secure login to Admin Dashboard */
define( 'FORCE_SSL_ADMIN', true );

/* Limit posts to 4 saved revisions and empty trash every 15 days
define( 'WP_POST_REVISIONS', 4 );
define( 'EMPTY_TRASH_DAYS', 15 );

/* Change default Uploads folder */
define( 'UPLOADS', 'wp-content/xyz/uploads' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment