Table of wp-config.php File Options

WordPress uses the file wp-config.php, located at the root of the website, to provide configuration settings. Options include the connection to the database.

To ensure that these settings are Include make your edits prior to the line:

/* That’s all, stop editing! Happy blogging. */

It’s also used to add other configuration options.

Given in the table below are a number of the configuration options.

NameDescription
WP_ALLOW_REPAIREnable automatic database optimisation support.
define( ‘WP_ALLOW_REPAIR’, true )
DISALLOW_FILE_EDITPrevent editing of files. Note when enabled the WordPress installation will not check for available theme, plugin and core updates.
Available options:
●true
●false
define (‘DISALLOW_FILE_EDIT’,true);
DISALLOW_FILE_MODSPrevent editing of files and installer. Note when enabled the WordPress installation will not check for available theme, plugin and core updates.

It removes the theme editor and plugin editor.

Disables all file modifications include updates and update notifications.

Available options:
●true
●false
define( ‘DISALLOW_FILE_MODS’, true );
FORCE_SSL_ADMINForce use of SSL for admin view of website. If using shared hosting the global server SSL will be used. This may affect how the browser reacts to the discrepancy between site and certificate, with it possibly preventing the site from being viewed.

Available options:
●true
●false
define(‘FORCE_SSL_ADMIN’, true);
https://developer.wordpress.org/reference/functions/force_ssl_admin/
WP_ALLOW_MULTISITEOption to enable the support of multi sites on the single WordPress installation.
Available options:
●true
●false
define(‘WP_ALLOW_MULTISITE’, false);
SUBDOMAIN_INSTALLOption to enable a domain based multi site operation.
Available options:
●true
●false
define(‘SUBDOMAIN_INSTALL’, true);
DOMAIN_CURRENT_SITEDefine the primary website on a multi site installation
define(‘DOMAIN_CURRENT_SITE’, ‘My Website’);
PATH_CURRENT_SITEDefine the path for the primary website on a multi site installation
define(‘PATH_CURRENT_SITE’, ‘/’);
SITE_ID_CURRENT_SITEDefine the Id of the primary website on a multi site installation
define(‘SITE_ID_CURRENT_SITE’, 1);
BLOG_ID_CURRENT_SITEDefine the blog Id of the primary website on a multi site installation
define(‘BLOG_ID_CURRENT_SITE’, 1);
WP_DEBUGTurn debug mode on and off. the default value is false, ie. debugging is disabled.
Setting the value to true enables debugging across the WordPress website.
Available options:
●true
●false
define(‘WP_DEBUG’, false);
WP_DEBUG_LOGThe enabled debug information is written to a log file. Located within the /wp-content directory of the website. This is a known directory and can
Available options:
●true
●false
define(‘WP_DEBUG_LOG’, false);
WP_DEBUG_DISPLAYThe enabled debug information is written to the display. Take care with this option the information provided is available to all who view the website.
Available options:
●true
●false
define(‘WP_DEBUG_DISPLAY’, false);
WP_MEMORY_LIMITDefine the maximum amount of memory to be used by PHP. Memory limit . Value is given in MB not GB.
The default value is 40MB.
define(‘WP_MEMORY_LIMIT’, ‘256M’)
WP_MAX_MEMORY_LIMITDefine the maximum memory as used within the WordPress admin area.
Value is given in MB not GB.
define(‘WP_MAX_MEMORY_LIMIT’, ‘256M’)
WP_POST_REVISIONSLimit the number of post revisions. Saving too many revisions of posts and pages can bloat the database. By setting a limit on the number of revisions to be kept can keep a better control on the expansion of the database. After all, how many revisions will you need to revert back to?
The example below sets a limit of 25.
define( ‘WP_POST_REVISIONS’, 25 );
or to disable revisions:
define( ‘WP_POST_REVISIONS’, false );
WP_TEMP_DIRDestination for live streaming, uploading of images, adding of plugins and updating of themes and WordPress core.
Below ABSPATH is the absolute path to the root of the websites file space. This will include the directory structure on the server, dividing each website. To automate this use dirname(__FILE__)
define(‘WP_TEMP_DIR’, ABSPATH . ‘/wp-content/temp/’);
WPLANGSet the language for the website
define (‘WPLANG’, ‘en-GB’);
CONCATENATE_SCRIPTSThe default is to join the reference to scripts(on the admin side) into a single URL reference, much like:
<script src=”http://www.example.com/wp-admin/load-scripts.phpc=0&amp;load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&amp;ver=5.7.2′></script>
An error in one of this files may cause an error on loading. Telling WordPress not to concatenate scripts may be used to counter this.
define(‘CONCATENATE_SCRIPTS’,false);
WP_SITEURLCorresponds to the entry siteurl within the database options table. The value configured within the wp_config.php file overrides that stored within the database. May be useful for ascertaining the value on a staging website copy of an original.
define( ‘WP_SITEURL’, ‘https://www.example.com’ );
WP_HOMECorresponds to the entry home within the database options table.The value configured within the wp_config.php file overrides that stored within the database. May be useful for ascertaining the value on a staging website copy of an original.
define( ‘WP_HOME’, ‘https://www.example.com’ );
WP_CONTENT_DIRRedefine the directory to be used in place of the default /wp-content/
define( ‘WP_CONTENT_DIR’, dirname(FILE) . ‘/extensions’ );
WP_CONTENT_URLDefine the updated reference for the redefiend wp-content directory.
define( ‘WP_CONTENT_URL’, ‘http://example.com/extensions’ );
WP_PLUGIN_DIRRedefine the directory used for plugins.Can be helpful regards website security, putting the plugins at a different location to that expected. This is the file system setting which is the full path on the server. Note there is no trailing slash at the end.
define( ‘WP_PLUGIN_DIR’, dirname(FILE) . ‘/extensions/plugins’ );
WP_PLUGIN_URLRedefine the directory used for plugins. Can be helpful regards website security, putting the plugins at a different location to that expected. This is the full website URL (address) reference, which includes the http://, or https:// at the beginning, with no trailing slash at the end.
define( ‘WP_PLUGIN_URL’, ‘http://example.com/extensions/plugins’ );
PLUGINDIROverride the wordPress default plugin directory
define( ‘PLUGINDIR’, dirname(FILE) . ‘/extensions/plugins’ );
UPLOADSRedefine the uploads folder.
define( ‘UPLOADS’, ‘wp-content/uploads’ );
WP_DEFAULT_THEMEIf the operational theme configured within wordPress’ appearance/theme admin page is removed, setting this before hand determines the fallback theme. Handy when a website has a number of themes installed.
define(‘WP_DEFAULT_THEME’, ‘twentytwenty’);
CUSTOM_USER_TABLERedefine the table to be used for the storage of user info.
define( ‘CUSTOM_USER_TABLE’, $table_prefix.’my_users’ );
CUSTOM_USER_META_TABLERedefine the table to be used for the storage of user meta info.
define( ‘CUSTOM_USER_META_TABLE’, $table_prefix.’my_usermeta’ );
AUTOSAVE_INTERVALSet the time in seconds, between the auto saves of the post, page or other content being edited.
define( ‘AUTOSAVE_INTERVAL’, 120 );
EMPTY_TRASH_DAYSConfigure the number of days before deleting entries within the bin…?
define( ‘EMPTY_TRASH_DAYS’, 3 );
ALTERNATE_WP_CRONOnce enabled this creates a secodnary request which is used to serve the visitor their requested page. The original request contiunes being used to action the cron in the usual way. Implementing ALTERNATE_WP_CRON can be used as a part of a strategy to improve a WordPress’ website response.
Available options:
●true
●false
define( ‘ALTERNATE_WP_CRON’, true );
DISABLE_WP_CRONDisabling the WordPress cron and using the system cron can be a speed boost.
Use this to disable the wordPress cron. Don’t forget to configure the server cron as its replacement.
Available options:
●true
●false
define( ‘DISABLE_WP_CRON’, true );
WP_CRON_LOCK_TIMEOUTWordPress uses a visitor visiting the website to initiate cron actions. There can be a impact on the website’s response. To reduce this add a timed separation, settign a minimum separation between callign the cron on visits. The example below sets this to 120 seconds (2 minutes).
define( ‘WP_CRON_LOCK_TIMEOUT’, 120 );
FS_CHMOD_FILEOverride the default permissons assigned to files.
define( ‘FS_CHMOD_FILE’, 0644 );
FS_CHMOD_DIROverride the default permissons assigned to directories.
define( ‘FS_CHMOD_DIR’, 0755 );
WP_HTTP_BLOCK_EXTERNALUsed to prevent WordPress from making external requests.
define( ‘WP_HTTP_BLOCK_EXTERNAL’, true );
WP_ACCESSIBLE_HOSTSTo counter the restrictions imposed by WP_HTTP_BLOCK_EXTERNAL add an accessible whitelist of sites. The list of sites is comma separated.
define( ‘WP_ACCESSIBLE_HOSTS’, ‘wordpress.org’ );
ALLOW_UNFILTERED_UPLOADSPermit uploading of files of any type.
define( ‘ALLOW_UNFILTERED_UPLOADS’,true;

Take care when editing the file not to break the link to the database. And don’t expose information about your website.