{"id":12113,"date":"2022-03-21T07:17:59","date_gmt":"2022-03-21T11:17:59","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=12113"},"modified":"2022-05-01T15:58:53","modified_gmt":"2022-05-01T19:58:53","slug":"all-wordpress-wp-config-php-constants-list-cheat-sheet","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/all-wordpress-wp-config-php-constants-list-cheat-sheet\/","title":{"rendered":"All the WordPress wp-config.php Constants List Cheat Sheet"},"content":{"rendered":"\n
This cheat sheet contains a list of the WordPress wp-config.php Constants that you can override to change the behavior of WordPress<\/a> to your liking.<\/p>\n\n\n\n Refs:<\/p>\n\n\n\n [ 1<\/a> ] – https:\/\/gist.github.com\/MikeNGarrett\/e20d77ca8ba4ae62adf5 This cheat sheet contains a list of the WordPress wp-config.php Constants that you can override to change the behavior of WordPress to your liking. Refs: [ 1 ] – https:\/\/gist.github.com\/MikeNGarrett\/e20d77ca8ba4ae62adf5…<\/p>\n","protected":false},"author":1,"featured_media":12171,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,4,25,27,16],"tags":[350,424,433,449,452,591,635,638,651],"yoast_head":"\n<?php \n\n\/\/ Enable or Disable WordPress debug. Avoid in production environments\ndefine( 'WP_DEBUG', true ); \/switch on debuging\ndefine( 'WP_DEBUG_LOG', true ); \/\/write errors to \/wp-content\/debug.log or ...\ndefine( 'WP_DEBUG_LOG', '\/path\/to\/custom\/debug\/location\/debug.log' ); \/\/custom debug.log file\ndefine( 'WP_DEBUG_DISPLAY', true ); \/\/ turn on\/off displaying of errors\ndefine( 'WP_LOCAL_DEV', true ); \/\/ Magic switch for local dev\n\n\/\/Set cookie constants\n\n\/\/ Set cookie domain for login cookies\n\/\/ Very helpful if you're getting cookie errors during login\ndefine( 'COOKIE_DOMAIN', '.example.com' ); \/\/ Domain and all subdomains\ndefine( 'COOKIE_DOMAIN', 'example.com' ); \/\/ only root domain\ndefine( 'COOKIE_DOMAIN', 'www.example.com' ); \/\/ only subdomain\n\n\/\/ More cookie constants\ndefine( 'COOKIEPATH', $_SERVER['HTTP_HOST'] . '\/' ); \/\/ You should set this explicitely. \ndefine( 'SITECOOKIEPATH', $_SERVER['HTTP_HOST'] . '\/' ); \/\/ You should set this explicitely. \ndefine( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );\ndefine( 'PLUGINS_COOKIE_PATH', preg_replace( '|https?:\/\/[^\/]+|i', '', WP_PLUGIN_URL ) );\n\n\/\/ Cookie names.\ndefine( 'USER_COOKIE', 'wordpressuser_' . COOKIEHASH );\ndefine( 'PASS_COOKIE', 'wordpresspass_' . COOKIEHASH );\ndefine( 'AUTH_COOKIE', 'wordpress_' . COOKIEHASH );\ndefine( 'SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH );\ndefine( 'LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH );\ndefine( 'RECOVERY_MODE_COOKIE', 'wordpress_rec_' . COOKIEHASH );\n\ndefine( 'NOBLOGREDIRECT', '%siteurl%' ); \/\/redirect no existent subdomain to url of your choice\n\n\/\/ SSL\ndefine( 'FORCE_SSL_LOGIN', true ); \/\/ Only secrue the registration\/login process\ndefine( 'FORCE_SSL_ADMIN', true ); \/\/ Force SSL for the whole WordPress admin\n\n\/\/ PHP memory limit for this site\ndefine( 'WP_MEMORY_LIMIT', '256M' );\ndefine( 'WP_MAX_MEMORY_LIMIT', '512M' ); \/\/ Increase admin-side memory limit.\n\n\/\/ Database\ndefine( 'WP_ALLOW_REPAIR', true ); \/\/ Allow WordPress to automatically repair your database.\ndefine( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); \/\/ Don't make database upgrades on global tables (like users)\n\n\/\/ Explicitely setting url\ndefine( 'WP_HOME', 'http:\/\/domain.com' );\ndefine( 'WP_SITEURL', 'http:\/\/domain.com' );\n\n\/\/ Set url to... whatever.\ndefine( 'WP_HOME', 'http:\/\/' . $_SERVER['HTTP_HOST'] );\ndefine( 'WP_SITEURL', 'http:\/\/' . $_SERVER['HTTP_HOST'] );\n\n\/\/ Set default theme\ndefine( 'WP_DEFAULT_THEME', 'twentytwentyone' );\n\n\/\/ Temporary for causing a site to relocate. Remove after login.\ndefine( 'RELOCATE', true );\n\n\/\/ Allow WordPress to update files\ndefine( 'FS_METHOD', 'direct' );\ndefine( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) ); \/\/ change permissions of directories\ndefine( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) ); \/\/ change permissions of files\n\n\/\/ Set the directory files should be downloaded to before they're moved.\n\/\/ This is usually set in the PHP conf\ndefine( 'WP_TEMP_DIR', '\/Applications\/MAMP\/tmp\/php\/' ); \/\/ this one is for default MAMP setup\n\n\/\/ Content, plugin, and template paths\ndefine( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '\/wp-content' ); \/\/ Full URL to wp-content\ndefine( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); \/\/ No trailing slash, full paths only to wp-content\ndefine( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '\/plugins' ); \/\/ Full path, no trailing slash.\ndefine( 'WP_PLUGIN_URL', WP_CONTENT_URL . '\/plugins' ); \/\/ Full URL, no trailing slash.\ndefine( 'PLUGINDIR', 'wp-content\/plugins' ); \/\/ Relative to ABSPATH. For back compat.\ndefine( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '\/mu-plugins' ); \/\/ Full path, no trailing slash.\ndefine( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '\/mu-plugins' ); \/\/ Full URL, no trailing slash.\ndefine( 'MUPLUGINDIR', 'wp-content\/mu-plugins' ); \/\/ Relative to ABSPATH. For back compat.\ndefine( 'TEMPLATEPATH', get_template_directory() );\ndefine( 'STYLESHEETPATH', get_stylesheet_directory() );\n\n\/\/ Set post revisions to something feasible\ndefine( 'WP_POST_REVISIONS', 15 );\n\n\/\/ Autosave interval of post revisions in seconds.\ndefine( 'AUTOSAVE_INTERVAL', 160 ); \/\/ Seconds\n\n\/\/ Script and style debug\ndefine( 'CONCATENATE_SCRIPTS', false ); \/\/ Causes WordPress scripts to be included separately\ndefine( 'SCRIPT_DEBUG', true ); \/\/ Uses unminified scripts\ndefine( 'SAVEQUERIES', true ); \/\/ Requires analyzing the global $wpdb object.\ndefine( 'COMPRESS_SCRIPTS', true ); \ndefine( 'COMPRESS_CSS', true );\ndefine( 'ENFORCE_GZIP', true );\n\n\/\/ Disable WP cron in favor of server cron\ndefine( 'DISABLE_WP_CRON', true );\ndefine( 'ALTERNATE_WP_CRON', true ); \/\/ alternate method of firing cron in the background when initiated by end users.\ndefine( 'WP_CRON_LOCK_TIMEOUT', MINUTE_IN_SECONDS ); \/\/ limit cron runs to a certain interval.\n\n\/\/ The "timthumb" fix\ndefine( 'WP_HTTP_BLOCK_EXTERNAL', true );\ndefine( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org,*.github.com' ); \/\/ Only allow particular hosts in\n\n\/\/ Modifying files\ndefine( 'DISALLOW_FILE_EDIT', true ); \/\/ Kill the WordPress file editor\ndefine( 'DISALLOW_FILE_MODS', true ); \/\/ Don't allow users to update core, plugins, or themes\ndefine( 'IMAGE_EDIT_OVERWRITE', true ); \/\/ Allow editing images to replace the originals\n\n\/\/ Changing WordPress updates.\ndefine( 'AUTOMATIC_UPDATER_DISABLED', true ); \/\/ Disable all WordPress auto-updates\ndefine( 'WP_AUTO_UPDATE_CORE', false ); \/\/ Only disable core updates\ndefine( 'WP_AUTO_UPDATE_CORE', 'minor' ); \/\/ Only enable minor core updates\n\n\/\/ Change languages\ndefine( 'WPLANG', 'us_EN' );\ndefine( 'WP_LANG_DIR', dirname(__FILE__) . 'wordpress\/languages' );\n\n\/\/ Trash\ndefine( 'EMPTY_TRASH_DAYS', 30 ); \/\/ Number of days to wait before emptying the trash\ndefine( 'MEDIA_TRASH', false ); \/\/ Whether to allow media items to use the trash functionality.\n\n\/\/ Dev tools\ndefine( 'SHORTINIT', false ); \/\/ Disable most of WordPress. Useful for fast responses for custom integrations.\n\/\/ https:\/\/wordpress.stackexchange.com\/questions\/12919\/what-is-the-constant-wp-use-themes-for\ndefine( 'WP_USE_THEMES', true ); \/\/ Override if you love WordPress, but hate themes. \n\n\/\/ Recovery mode and fatal error handling.\ndefine( 'WP_SANDBOX_SCRAPING', true ); \/\/ Turn off WSOD Protection (and don't send email notification)\ndefine( 'WP_START_TIMESTAMP', microtime( true ) ); \/\/ Modify the WordPress start time. \ndefine( 'RECOVERY_MODE_EMAIL', 'user@example.com' ); \/\/ Set a recovery mode email.\n<\/code><\/pre>\n\n\n\n
[ 2<\/a> ] – https:\/\/github.com\/WordPress\/WordPress\/blob\/master\/wp-includes\/default-constants.php
[ 3<\/a> ] – https:\/\/github.com\/WordPress\/WordPress\/blob\/master\/wp-includes\/ms-files.php<\/p>\n","protected":false},"excerpt":{"rendered":"