Posibilidades del Config.php de WordPress
El config de WP ofrece muchas opciones que por defecto no están comentadas. Os dejo unos ejemplos de de variables que no estan por defecto en el config.php uso que os pueden ser utiles en algunos casos:
define(‘WP_MEMORY_LIMIT’, ‘128M’ ); // Memory Limit
define(‘CACHE_EXPIRATION_TIME’, 12600); // in seconds(3600s=1h)
define(‘WP_POST_REVISIONS’, false); // Disable post revision
define(‘WP_POST_REVISIONS’, 3); //Limit the number of saved revisions
define(‘EMPTY_TRASH_DAYS’, 15); // empty trash in 15 days (0 = disable)
define(‘AUTOSAVE_INTERVAL’, 120); // I have changed to 120 seconds.
define(‘WP_HOME’, ‘http://’.$_SERVER[‘HTTP_HOST’].»);
define(‘WP_SITEURL’, ‘http://’.$_SERVER[‘HTTP_HOST’].»);
define(‘WP_CACHE’, true);
define(‘SCRIPT_DEBUG’, true); //loads the development (non-minified) versions of all scripts and CSS, and disables compression and concatenation
define(‘CONCATENATE_SCRIPTS’, true); //enable compression and concatenation of scripts and CSS
define(‘COMPRESS_SCRIPTS’, true); //enable compression of scripts
define(‘COMPRESS_CSS’, true); //enable compression of CSS
define(‘ENFORCE_GZIP’, true); //forces gzip for compression (default is deflate)
define(‘WP_HTTP_BLOCK_EXTERNAL’, true); //only intranet
define(‘WP_ACCESSIBLE_HOSTS’, ‘rpc.pingomatic.com’); //whitelist if intranet
define(‘WP_ALLOW_REPAIR’, true); //if true you can repair your database anytime by visiting /wp-admin/maint/repair.php
define(‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/oc-folder-structure/wp-content’);
define(‘WP_PLUGIN_DIR’, $_SERVER[‘DOCUMENT_ROOT’].’/path/wp-content/plugins’);
define(‘WP_ALLOW_MULTISITE’, true);
define(‘DISALLOW_FILE_EDIT’,true);
define(‘FS_CHMOD_DIR’, (0755 & ~ umask()));
define(‘FS_CHMOD_FILE’, (0644 & ~ umask()));
@ini_set(‘log_errors’,’On’);
@ini_set(‘display_errors’,’Off’);
@ini_set(‘error_log’,’/home/path/domain/logs/php_error.log’);
define(‘LANGDIR’, »);
define(‘COOKIE_DOMAIN’, ‘.’.$_SERVER[‘HTTP_HOST’]);
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’);
define(‘FS_METHOD’, ‘ftpext’); // forces the filesystem method: «direct», «ssh», «ftpext», or «ftpsockets»
define(‘FTP_BASE’, ‘/path/to/wordpress/’); // absolute path to root installation directory
define(‘FTP_CONTENT_DIR’, ‘/path/to/wordpress/wp-content/’); // absolute path to «wp-content» directory
define(‘FTP_PLUGIN_DIR ‘, ‘/path/to/wordpress/wp-content/plugins/’); // absolute path to «wp-plugins» directory
define(‘FTP_PUBKEY’, ‘/home/username/.ssh/id_rsa.pub’); // absolute path to your SSH public key
define(‘FTP_PRIVKEY’, ‘/home/username/.ssh/id_rsa’); // absolute path to your SSH private key
define(‘FTP_USER’, ‘username’); // either your FTP or SSH username
define(‘FTP_PASS’, ‘password’); // password for FTP_USER username
define(‘FTP_HOST’, ‘ftp.domain.tld:21′); // hostname:port combo for your SSH/FTP server
Comments
No comment yet.