In the backend of WordPress you don’t have an input field for each possible modification. Some are only available via an action or a filter and for some changes you need to define or change a PHP constant.
In this article I have listed all constants which WordPress has by nature (except the deprecated ones).
A constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script. A constant is case-sensitive by default. By convention, constant identifiers are always uppercase.
PHP docs
Content
- General
- Status
- Paths, dirs and links
- Database
- Multisite
- Cache and script compressing
- Filesystem and connections
- Themes
- Debug
- Security and cookies
General
AUTOSAVE_INTERVAL#
Defines an interval, in which WordPress should do an autosave.
Value:time in seconds(Default:60)CORE_UPGRADE_SKIP_NEW_BUNDLED#
Allows you to skip new bundles files like plugins and/or themes on upgrades.
Values:true|falseDISABLE_WP_CRON#
Deactivates the cron function of WordPress.
Value:trueEMPTY_TRASH_DAYS#
Controls the number of days before WordPress permanently deletes posts, pages, attachments, and comments, from the trash bin.
Value:time in days(Default:30)IMAGE_EDIT_OVERWRITE#
Allows WordPress to override an image after editing or to save the image as a copy.
Values:true|falseMEDIA_TRASH#
(De)activates the trash bin function for media.
Values:true|false(Default:false)WPLANG#
Defines the language which WordPress should use.
Values: For Germande_DEWP_DEFAULT_THEME#
Defines a default theme for new sites, also used as fallback for a broken theme.
Value:template name(Default:twentyeleven)WP_CRON_LOCK_TIMEOUT#
Defines a period of time in which only one cronjob will be fired. Since WordPress 3.3.
Value:time in seconds(Default:60)WP_MAIL_INTERVAL#
Defines a period of time in which only one mail request can be done.
Value:time in seconds(Default:300)WP_POST_REVISIONS#
(De)activates the revision function for posts. A number greater than 0 defines the number of revisions for one post.
Values:true|false|number(Default:true)WP_MAX_MEMORY_LIMIT#
Allows you to change the maximum memory limit for some WordPress functions.
Values: See PHP docs (Default:256M)WP_MEMORY_LIMIT#
Defines the memory limit for WordPress.
Values: See PHP docs (Default:32M, for Multisite64M)
Status
APP_REQUEST#
Will be defined if it’s an Atom Publishing Protocol request.
Value:trueCOMMENTS_TEMPLATE#
Will be defined if the comments template is loaded.
Value:trueDOING_AJAX#
Will be defined if it’s an AJAX request.
Value:trueDOING_AUTOSAVE#
Will be defined if WordPress is doing an autosave for posts.
Value:trueDOING_CRON#
Will be defined if WordPress is doing a cronjob.
Value:trueIFRAME_REQUEST#
Will be defined if it’s an inlineframe request.
Value:trueIS_PROFILE_PAGE#
Will be defined if a user change his profile settings.
Value:trueSHORTINIT#
Can be defined to load only the half of WordPress.
Value:trueWP_ADMIN#
Will be defined if it’s a request in backend of WordPress.
Value:trueWP_BLOG_ADMIN#
Will be defined if it’s a request in/wp-admin/.
Value:trueWP_IMPORTING#
Will be defined if WordPress is importing data.
Value:trueWP_INSTALLING#
Will be defined on an new installation or on an upgrade.
Value:true#WP_INSTALLING_NETWORK#
Will be defined if it’s a request in network admin or on installing a network. Since WordPress 3.3, previousWP_NETWORK_ADMIN_PAGE.
Value:trueWP_LOAD_IMPORTERS#
Will be defined if you visit the importer overview (Tools → Importer).
Value:trueWP_NETWORK_ADMIN#
Will be defined if it’s a request in/wp-admin/network/.
Value:trueWP_REPAIRING#
Will be defined if it’s a request to/wp-admin/maint/repair.php.
Value:trueWP_SETUP_CONFIG#
Will be defined if WordPress will be installed or configured.
Value:trueWP_UNINSTALL_PLUGIN#
Will be defined if a plugin wil be uninstalled (foruninstall.php).
Value:trueWP_USER_ADMIN#
Will be defined if it’s a request in/wp-admin/user/.
Value:trueXMLRPC_REQUEST#
Will be defined if it’s a request over the XML-RPC API.
Value:true
Paths, dirs and links
ABSPATH#
Absolute path to the WordPress root dir.
Default:path to wp-load.phpWPINC#
Relative path to the/wp-includes/. You can’t change it.
Default:wp-includesWP_LANG_DIR#
Absolute path to the folder with language files.
Default:WP_CONTENT_DIR/languagesorWP_CONTENT_DIRWPINC/languagesWP_PLUGIN_DIR#
Absolute path to the plugins dir.
Default:WP_CONTENT_DIR/pluginsWP_PLUGIN_URL#
URL to the plugins dir.
Default:WP_CONTENT_URL/pluginsWP_CONTENT_DIR#
Absolute path to thewp-contentdir.
Default:ABSPATHwp-contentWP_CONTENT_URL#
URL to thewp-contentdir.
Default:{Site URL}/wp-contentWP_HOME#
Home URL of your WordPress.WP_SITEURL#
URL to the WordPress root dir.WP_TEMP_DIR#
Absolute path to a dir, where temporary files can be saved.WPMU_PLUGIN_DIR#
Absolute path to the must use plugin dir.
Default:WP_CONTENT_DIR/mu-pluginsWPMU_PLUGIN_URL#
URL to the must use plugin dir.
Default:WP_CONTENT_URL/mu-plugins
Database
DB_CHARSET#
Defines the database charset.
Values: See MySQL docs (Default:utf8)DB_COLLATE#
Defines the database collation.
Values: See MySQL docs (Default:utf8_general_ci)DB_HOST#
Defines the database host.
Values:IP address, domain and/or port(Default:localhost)DB_NAME#
Defines the database name.
Value:database nameDB_PASSWORD#
Defines the database password.DB_USER#
Defines the database user.WP_ALLOW_REPAIR#
Allows you to automatically repair and optimize the database tables via/wp-admin/maint/repair.php.
Value:trueCUSTOM_USER_TABLE#
Allows you to define a custom user table.
Value:table nameCUSTOM_USER_META_TABLE#
Allows you to define a custom user meta table.
Value:table name
Multisite
ALLOW_SUBDIRECTORY_INSTALL#
Allows you to install Multisite in a subdirectory.
Value:trueBLOGUPLOADDIR#
Absolute path to the site specific upload dir.
Default:WP_CONTENT_DIR/blogs.dir/{Blog ID}/files/BLOG_ID_CURRENT_SITE#
Blog ID of the main site.
Default:1DOMAIN_CURRENT_SITE#
Domain of the main site.
Default:domainDIEONDBERROR#
When defined database errors will be displayed on screen.
Value:trueERRORLOGFILE#
When defined database erros will be logged into a file.
Value:absolute path to a writeable fileMULTISITE#
Will be defined if Multisite is used.
Value:trueNOBLOGREDIRECT#
Defines an URL of a site on which WordPress should redirect, if registration is closed or a site doesn’t exists.
Values:%siteurl%for mainsite orcustom URLPATH_CURRENT_SITE#
Path to the main site.UPLOADBLOGSDIR#
Path to the upload base dir, relative toABSPATH.
Default:wp-content/blogs.dirSITE_ID_CURRENT_SITE#
Network ID of the main site.
Default:1SUBDOMAIN_INSTALL#
Defines if it’s a subdomain install or not.
Values:true|falseSUNRISE#
When defined WordPres will load the/wp-content/sunrise.phpfile.
Value:trueUPLOADS#
Path to site specific upload dir, relative toABSPATH.
Default:UPLOADBLOGSDIR/{blogid}/files/WPMU_ACCEL_REDIRECT#
(De)activates support for X-Sendfile Header.
Values:true|false(Default:false)WPMU_SENDFILE#
(De)activates support for X-Accel-Redirect Header.
Values:true|false(Default:false)WP_ALLOW_MULTISITE#
When defined the multisite function will be accessible (Tools → Network Setup).
Value:true
Cache and script compressing
WP_CACHE#
When defined WordPres will load the/wp-content/advanced-cache.phpfile.
Values:true|false(Default:false)COMPRESS_CSS#
(De)activates the compressing of stylesheets.
Values:true|falseCOMPRESS_SCRIPTS#
(De)activates the compressing of Javascript files.
Values:true|falseCONCATENATE_SCRIPTS#
(De)activates the consolidation of Javascript or CSS files before compressing.
Values:true|falseENFORCE_GZIP#
(De)activates gzip output.
Values:true|false
Filesystem and connections
FS_CHMOD_DIR#
Defines the read and write permissions for directories.
Values: See PHP handbook (Default:0755)FS_CHMOD_FILE#
Defines the read and write permissions for files.
Values: See PHP handbook (Default:0644)FS_CONNECT_TIMEOUT#
Defines a timeout for building a connection.
Values:time in seconds(Default:30)FS_METHOD#
Defines the method to connect to the filesystem.
Values:direct|ssh|ftpext|ftpsocketsFS_TIMEOUT#
Defines a timeout after a connection has been lost.
Values:time in seconds(Default:30)FTP_BASE#
Path to the WordPress root dir.
Default:ABSPATHFTP_CONTENT_DIR#
Path to the/wp-content/dir.
Default:WP_CONTENT_DIRFTP_HOST#
Defines the FTP host.
Values:IP Adresse, Domain und/oder PortFTP_LANG_DIR#
Path to the folder with language files.
Default:WP_LANG_DIRFTP_PASS#
Defines the FTP password.FTP_PLUGIN_DIR#
Path to the plugin dir.
Default:WP_PLUGIN_DIRFTP_PRIKEY#
Defines a private key for SSH.FTP_PUBKEY#
Defines a public key for SSH.FTP_SSH#
(De)activates SSH.
Values:true|falseFTP_SSL#
(De)activates SSL.
Values:true|falseFTP_USER#
Defines the FTP username.WP_PROXY_BYPASS_HOSTS#
Allows you to define some adresses which shouldn’t be passed through a proxy.
Values:www.example.com, *.example.orgWP_PROXY_HOST#
Defines the proxy adresse.
Values:IP address or domainWP_PROXY_PASSWORD#
Defines the proxy password.WP_PROXY_PORT#
Defines the proxy port.WP_PROXY_USERNAME#
Defines the proxy username.WP_HTTP_BLOCK_EXTERNAL#
Allows you to block external request.
Values:true|falseWP_ACCESSIBLE_HOSTS#
IfWP_HTTP_BLOCK_EXTERNALis defined you can add hosts which shouldn’t be blocked.
Values:www.example.com, *.example.org
Themes
BACKGROUND_IMAGE#
Defines a default background image.HEADER_IMAGE#
Defines a default header image.HEADER_IMAGE_HEIGHT#
Defines the height of the header image.HEADER_IMAGE_WIDTH#
Defines the width of the header image.HEADER_TEXTCOLOR#
Defines the font color for the header text.NO_HEADER_TEXT#
(De)activates the support for header text.
Values:true|falseSTYLESHEETPATH#
Defines the absolute path to the stylesheet of the current theme.TEMPLATEPATH#
Defines the absolute path to the template files of the current theme.WP_USE_THEMES#
(De)activates the loading of themes.
Values:true|false
Debug
SAVEQUERIES#
(De)activates the saving of database queries in an array ($wpdb->queries).
Values:true|falseSCRIPT_DEBUG#
(De)activates the loading of compressed Javascript and CSS files.
Values:true|falseWP_DEBUG#
(De)activates the debug mode in WordPress.
Values:true|false(Default:false)WP_DEBUG_DISPLAY#
(De)activates the display of errors on the screen.
Values:true|false|null(Default:true)WP_DEBUG_LOG#
(De)activates the writing of errors to the/wp-content/debug.logfile.
Values:true|false(Default:false)
Security and cookies
ADMIN_COOKIE_PATH#
Path to the/wp-admin/dir.
Default:SITECOOKIEPATHwp-adminor for Multisite in subdirectorySITECOOKIEPATHALLOW_UNFILTERED_UPLOADS#
Allows unfiltered uploads by admins.
Value:trueAUTH_COOKIE#
Cookie name for the authentication.
Default:wordpress_COOKIEHASHAUTH_KEY#
Secret key.
Values: See generatorAUTH_SALT#
Secret key.
Values: See generatorCOOKIEHASH#
Hash for generating cookie names.COOKIEPATH#
Path to WordPress root dir.
Default:Home URL without http(s)://COOKIE_DOMAIN#
Domain of the WordPress installation.
Default:falseor for Multisite with subdomains.domain of the main siteCUSTOM_TAGS#
Allows you to override the list of secure HTML tags. See/wp-includes/kses.php.
Values:true|false(Default:false)DISALLOW_FILE_EDIT#
Allows you to disallow theme and plugin edits via WordPress editor.
Value:trueDISALLOW_FILE_MODS#
Allows you to disallow the editing, updating, installing and deleting of plugins, themes and core files via WordPress Backend.
Value:trueDISALLOW_UNFILTERED_HTML#
Allows you to disallow unfiltered HTML for every user, admins too.
Value:trueFORCE_SSL_ADMIN#
Activates SSL for logins and in the backend.
Values:true|false(Default:false)FORCE_SSL_LOGIN#
Activates SSL for logins.
Values:true|false(Default:false)LOGGED_IN_COOKIE#
Cookie name for logins.
Default:wordpress_logged_in_COOKIEHASHLOGGED_IN_KEY#
Secret key.
Values: See generatorLOGGED_IN_SALT#
Secret key.
Values: See generatorNONCE_KEY#
Secret key.
Values: See generatorNONCE_SALT#
Secret key.
Values: See generatorPASS_COOKIE#
Cookie name for the password.
Default:wordpresspass_COOKIEHASHPLUGINS_COOKIE_PATH#
Path to the plugins dir.
Default:WP_PLUGIN_URLwithout http(s)://SECURE_AUTH_COOKIE#
Cookie name for the SSL authentication.
Default:wordpress_sec_COOKIEHASHSECURE_AUTH_KEY#
Secret key.
Values: See generatorSECURE_AUTH_SALT#
Secret key.
Values: See generatorSITECOOKIEPATH#
Path of you site.
Default:Site URL without http(s)://TEST_COOKIE#
Cookie name for the test cookie.
Default:wordpress_test_cookieUSER_COOKIE#
Cookie name for users.
Default:wordpressuser_COOKIEHASH
Guest Post
This post is written by Dominik Schilling – wpgrafie.de and is a post in our Advent Calendar on WP Engineer about WordPress. Dominik is Student, Web Developer, WordPress Contributing Developer – ocean90 and he ♥ WordPress.
Thank you very much from my part to Dominik.
If you also like to have your interesting post published on our website, please let us know on our contact page. Of course we will appreciate your contribution!

Comments
9 responses to “WordPress constants overview”
Thanks Dominic, very useful
great summary, thanks! really saves me a lot of time!
[…] sich um 2 sehr interessante Sammlungen für WordPress Entwickler. Als erstes möchte ich hier die WordPress constants overview erwähnen. In der Sammlung findet man alle möglichen WordPress Konstanten. Die Liste ist sehr […]
Awesome stuff, thanks for taking the time to put this together!
That’s a great overview, thank you very much!
Thanks Dominic!
Sometimes you need to do something in WP, but little information…
Awesome list!!! a time save
there is a typo on language at
WP_LANG_DIR #
Absolute path to the folder with lanugage files
@Steffy: thanks, i have fixed this typo.
[…] List Of All Available WordPress Constants There are a boatload of constants available to use in WordPress, and the guys over at WPEngineer put together a nice article that lists all of them, with a short description of each. […]