Skip to content

Instantly share code, notes, and snippets.

@phlyper
Last active November 25, 2017 22:32
Show Gist options
  • Save phlyper/5f56ba93c9f1a022fc912c4c2c9ebd51 to your computer and use it in GitHub Desktop.
Save phlyper/5f56ba93c9f1a022fc912c4c2c9ebd51 to your computer and use it in GitHub Desktop.
<?php
# Disable Automatic Updates in WordPress
# wp-config.php
define('WP_AUTO_UPDATE_CORE', false);
# Disable Cron and Cron Timeout
define('DISABLE_WP_CRON', true);
define('WP_CRON_LOCK_TIMEOUT', 60);
# set charset
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', 'utf8_general_ci' );
# active debug
@ini_set('log_errors', 'Off');
@ini_set('log_errors', 'On');
@ini_set('display_errors', 'Off');
@ini_set('error_log', '/home/example.com/logs/php_error.log');
/* That's all, stop editing! Happy blogging. */
define('WP_DEBUG', true);
if ( WP_DEBUG ) {
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
define('SCRIPT_DEBUG', true);
define('SAVEQUERIES', true);
}
# set multiple domaine
if(isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], array('mysite.tn', 'www.mysite.tn', 'mysite.net', 'www.mysite.net', 'mysite.org', 'www.mysite.org', 'mysite.com', 'www.mysite.com', 'mysite.io', 'www.mysite.io', 'mysite.se', 'www.mysite.se'))) {
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '');
}
# define( 'WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/path/to/wordpress' );
# define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/path/to/wordpress' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment