hoangweb
4/18/2016 - 3:12 AM

wp-config.php

wp-config.php

<?php
# Debugging log
define('WP_DEBUG', true); // debugging mode: 'true' = enable; 'false' = disable
@ini_set('log_errors','On');
@ini_set('display_errors','Off');
@ini_set('error_log','/home/path/domain/logs/php_error.log');

# Database Character Set
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

# Security Keys: http://api.wordpress.org/secret-key/1.1/
define('AUTH_KEY', ':dr+%/5V4sAUG-gg%aS*v;&xGhd%{YV)p:Qi?jXLq,<h\\`39');
define('SECURE_AUTH_KEY', '@*+S=8\"\'+\"}]<m#+}V)p:Qi?jXLq,<h\\`39m_(');
define('LOGGED_IN_KEY', 'S~AACm4h1;T^\"qW3_8Zv!Ji=y|)~5i63JI |Al[(<YS');
define('NONCE_KEY', 'k1+EOc-&w?hG8j84>6L9v\"6C89NH?ui{*3\\(t09mumL/fF');

/** Server settings for Jetpack */
$_SERVER['SERVER_PORT'] = 80;

# disable cron
define('DISABLE_WP_CRON', true)
//------------------------tempalte-------------------------------
# change default theme
define('WP_DEFAULT_THEME', 'mytheme');

#Template Path and Stylesheet Path
define('TEMPLATEPATH', get_template_directory());
define('STYLESHEETPATH', get_stylesheet_directory());

define('TEMPLATEPATH', '/absolute/path/to/wp-content/themes/active-theme');
define('STYLESHEETPATH', '/absolute/path/to/wp-content/themes/active-theme');

#----------------------cache-----------------------------------
#enable cache
define('WP_CACHE', true);
define('ENABLE_CACHE', TRUE);
define('CACHE_EXPIRATION_TIME', 3600); // in seconds

#disable cache
define('WP_CACHE', false);     // disable the cache
define('DISABLE_CACHE', true); // disable the cache

#--------------------------------------------------------------
# Autosave Interval
define('AUTOSAVE_INTERVAL', 160); // in seconds, don't go nuts

# By default WordPress deletes the Trash every 30 days
define('EMPTY_TRASH_DAYS', 7); // empty weekly
define('EMPTY_TRASH_DAYS', 0); // disable trash

# Block External Requests
define('WP_HTTP_BLOCK_EXTERNAL', true);
define('WP_HTTP_BLOCK_EXTERNAL', false); // allow external requests
define('WP_ACCESSIBLE_HOSTS', 'api.wordpress.org'); // whitelist hosts

# PHP Memory, fix Allowed memory size of xxx bytes exhausted,
define('WP_MEMORY_LIMIT', '64M');
define('WP_MEMORY_LIMIT', '96M');
define('WP_MEMORY_LIMIT', '128M');

# File Permissions, don’t need the quotes around the permission values
define('FS_CHMOD_FILE', 0755);
define('FS_CHMOD_DIR', 0755);

# Cookie Domain, tell WordPress to send cookies only to your non-static domain
define('COOKIE_DOMAIN', '.digwp.com'); // don't omit the leading '.'
define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home').'/'));
define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl').'/'));
define('PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL));
define('ADMIN_COOKIE_PATH', SITECOOKIEPATH.'wp-admin');

# -----------------------------Post Revisions-------------------------------------------
// Limit the number of saved revisions
define('WP_POST_REVISIONS', 3); // any integer, but don't go crazy

// Disable the post-revisioning feature
define('WP_POST_REVISIONS', false); // kill the bloat

#_-------------------------------database---------------------------------------
$table_prefix  = 'wp_';

#---------------credentials---------------
/** The name of the database for WordPress */
define('DB_NAME', 'test-wp');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'hoang');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

//----------Automatic Database Repair----------
/*
enables you to repair and optimize your database even when not logged in.
open “Database Repair” page: http://example.com/wp-admin/maint/repair.php
*/
define('WP_ALLOW_REPAIR', true);

#-------------------------------------path-url---------------------------------------------
# blog-site-address
define('WP_CONTENT_DIR', __DIR__ . '/wp-content');
define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content');

# separate system files in subfolder
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp');

define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);

# ------------------Moving Your wp-content directory
// full local path of current directory (no trailing slash)
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'].'/path/wp-content'); 

// full URI of current directory (no trailing slash)
define('WP_CONTENT_URL', 'http://domain.tld/path/wp-content');

#------------------change plugin path-----------------------
// full local path of current directory (no trailing slash)
define('WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'].'/path/wp-content/plugins'); 

// full URI of current directory (no trailing slash)
define('WP_PLUGIN_URL', 'http://domain.tld/path/wp-content/plugins');

#--------------------------------------plugin-----------------------------------------
#contact form 7
define('WPCF7_LOAD_CSS', false);
define( 'WPCF7_AUTOP', false );
define ('WPCF7_LOAD_JS', false );