{"id":37657,"date":"2019-08-22T21:18:34","date_gmt":"2019-08-22T13:18:34","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=37657"},"modified":"2022-10-18T20:11:59","modified_gmt":"2022-10-18T12:11:59","slug":"wpconfig-snippets-configure-wordpress","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/","title":{"rendered":"15 wp-config Snippets to Configure WordPress Site"},"content":{"rendered":"<p>WordPress admin makes it easy to <strong>manage configurations<\/strong> without touching a line of code. These <a href=\"https:\/\/codex.wordpress.org\/Administration_Screens#Settings_-_Configuration_Settings\" target=\"_blank\" rel=\"noopener\">basic configuration settings<\/a> are then <strong>stored in the <code>wp-options<\/code> table<\/strong> inside the database. But, WordPress also has a <strong>separate configuration file<\/strong>, called <strong><code>wp-config.php<\/code><\/strong>, that can be used for <strong>further customizations<\/strong>.<\/p>\n<p>Wp-config is the file where your <strong>custom hosting data<\/strong> (database name, database host, etc.) <strong>is saved<\/strong> when you install a self-hosted WordPress site. You can also add <strong>other configuration options<\/strong> to this file, with which you can enable or disable features such as debugging, cache, multisite, SSL login, automatic updates, and many others.<\/p>\n<p class=\"note\"><strong>Read Also:<\/strong> <a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/useful-htaccess-snippets-for-wordpress\/\" rel=\"noopener\">15 Useful .htaccess Snippets for Your WordPress Site<\/a><\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-frontend.jpg\" width=\"800\" height=\"499\" alt=\"wp-config frontend\"><\/figure>\n<h2>Localize and edit wp-config<\/h2>\n<p>When you download WordPress, the <code>wp-config.php<\/code> file is <strong>not yet present<\/strong> inside the install folder. However, there\u2019s a file called <code>wp-config-sample.php<\/code> that you need to copy and rename to <code>wp-config.php<\/code>. Then, you need to <strong>add your basic connection data<\/strong> (database name, database username, database password, hostname, security keys) to this file.<\/p>\n<p>If your hosting provider uses the <strong>Softaculous auto installer<\/strong> (most do so) this process is <strong>automated for you<\/strong> and you will find a <code>wp-config.php<\/code> and a <code>wp-config-sample.php<\/code> file in your root folder when you connect your server via FTP.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-sample.jpg\" width=\"800\" height=\"521\" alt=\"wp-config.php\"><\/figure>\n<p>Note that the <strong>order of settings matters<\/strong>, so don\u2019t rearrange them. When editing the wp-config file, <strong>always use a code editor<\/strong> such as Sublime Text, Atom, Notepad++, Visual Studio Code, or TextMate. Word processors (Microsoft Office, Google Docs, LibreOffice, etc.) will mess your file up, <strong>never use them<\/strong> to edit code files.<\/p>\n<p>The settings saved into wp-config <strong>override the database<\/strong>, in case the same type of configuration is present at both (e.g. home URL)<\/p>\n<h3>Where to place the code snippets<\/h3>\n<p>In this article, you can find <strong>20 code snippets<\/strong> with which you can use to customize your <code>wp-config.php<\/code> file.<\/p>\n<p>Most of these configuration options <strong>don\u2019t exist<\/strong> in wp-config by default. If you want to use them you need to add them <strong>below the starting <code>&lt;?php<\/code> tag and code comments<\/strong>, but <strong>above the MySQL settings<\/strong>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/place-of-snippets.jpg\" width=\"800\" height=\"696\" alt=\"Place of snippets\"><\/figure>\n<h2>1. Turn on WP debugger<\/h2>\n<p>You can turn the WordPress debugger on and off in the wp-config file. The first snippet below <strong>does exist by default<\/strong> in wp-config (below the database configurations) but its value is set to <code>false<\/code>. To turn the debugger on, change its value to <code>true<\/code>.<\/p>\n<p>The second snippet <strong>turns on the frontend debugger<\/strong> that allows you to debug CSS and JavaScript scripts. Use the debuggers <strong>only on development sites<\/strong> never in production.<\/p>\n<pre>\r\n# Turns on PHP debugger\r\ndefine( 'WP_DEBUG', true );\r\n\r\n# Turns on CSS and JavaScript debugger\r\ndefine( 'SCRIPT_DEBUG', true );\r\n<\/pre>\n<h2>2. Change database table prefix<\/h2>\n<p>WordPress uses the <code>wp_<\/code> table prefix by default. If you want a more secure database you can <strong>choose a more complicated table prefix<\/strong>.<\/p>\n<p>This config option also exists in the wp-config file by default, you only need to <strong>change the value<\/strong> of the <code>$table_prefix<\/code> variable to a more secure one.<\/p>\n<p>Only change the table prefix if you have a <strong>clean install<\/strong> or on a <strong>development site<\/strong>, as it\u2019s risky to do so on a production site.<\/p>\n<pre>\r\n# Creates secure table prefix for database tables\r\n# Only numbers, letters, underscores\r\n$table_prefix = 'a81kJt_';\r\n<\/pre>\n<h2>3. Change WordPress URLs<\/h2>\n<p>You can <strong>set the WordPress and home URLs<\/strong> in the WordPress admin, under the <code>Settings &gt; General<\/code> menu. However, you can also configure these URLs in the wp-config file.<\/p>\n<p>Defining the <code>WP_SITEURL<\/code> and <code>WP_HOME<\/code> constants in the wp-config file has two advantages:<\/p>\n<ol>\n<li>it can be life-saving if you <strong>can\u2019t access your admin area<\/strong> for some reason<\/li>\n<li>it can <strong>reduce the number of database calls<\/strong> while your site is loading (as wp-config overrides the options saved in the database)<\/li>\n<\/ol>\n<p><code>WP_SITEURL<\/code> specifies the URL <strong>users can reach your site<\/strong> with, while <code>WP_HOME<\/code> defines the <strong>root of your WP install<\/strong>. If you installed WordPress into your root folder (this is the default option) they <strong>take the same value<\/strong>.<\/p>\n<pre>\r\n# Specifies site URL\r\ndefine('WP_SITEURL', 'http:\/\/www.yourwebsite.com');\r\n\r\n# Specifies home URL (the root of the WP install)\r\ndefine('WP_HOME', 'http:\/\/www.yourwebsite.com\/wordpress');\r\n<\/pre>\n<h2>4. Empty trash after a certain time<\/h2>\n<p>You can make WordPress to <strong>automatically empty your trash<\/strong> after a certain number of dates. The smallest value of this constant is 0, in this case you <strong>disable the trash feature<\/strong>.<\/p>\n<pre>\r\n# Empties trash after 7 days\r\ndefine( 'EMPTY_TRASH_DAYS', 7 );\r\n<\/pre>\n<h2>5. Enable WordPress cache<\/h2>\n<p>You can <strong>enable WordPress\u2019 built-in caching feature<\/strong> with the following line of code. Most caching plugins, such as <a href=\"https:\/\/wordpress.org\/plugins\/w3-total-cache\/W3\" target=\"_blank\" rel=\"noopener\">W3 Total Cache<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/wp-super-cache\/\" target=\"_blank\" rel=\"noopener\">WP Super Cache<\/a>, <strong>automatically add this snippet<\/strong> to the wp-config file.<\/p>\n<pre>\r\n# Enables WP cache\r\ndefine( 'WP_CACHE', true );\r\n<\/pre>\n<h2>6. Enable WordPress Multisite<\/h2>\n<p>By adding the <code>WP_ALLOW_MULTISITE<\/code> constant to your wp-config file, you can <strong>enable WordPress\u2019 <a href=\"https:\/\/codex.wordpress.org\/Create_A_Network\" target=\"_blank\" rel=\"noopener\">multisite feature<\/a><\/strong> that allows you to create a <strong>network of WP sites<\/strong>.<\/p>\n<pre>\r\n# Turns on WordPress Multisite\r\ndefine( 'WP_ALLOW_MULTISITE', true );\r\n<\/pre>\n<h2>7. Redirect non-existing subdomains and subfolders<\/h2>\n<p>Sometimes visitors type a non-existing subdomain or subfolder into the URL bar. You can <strong>redirect these users to another page<\/strong> on your domain, for instance to the homepage with the help of the <code>NOBLOGREDIRECT<\/code> constant.<\/p>\n<pre>\r\n# Redirects non-existing subdomains and subfolders to homepage\r\ndefine( 'NOBLOGREDIRECT', 'http:\/\/www.yourwebsite.com' );\r\n<\/pre>\n<h2>8. Manage post revisions<\/h2>\n<p>WordPress has a <strong>built-in version control system<\/strong>, which means it <strong>saves all post revisions<\/strong> you create. A frequently edited post can have as many as 25-30 revisions that can take up a lot of database space after a while.<\/p>\n<p>With the <code>WP_POST_REVISIONS<\/code> constant, you can <strong>maximize the number of post revisions<\/strong> or completely <strong>disable the feature<\/strong>.<\/p>\n<pre>\r\n# Completely disables post revisions\r\ndefine( 'WP_POST_REVISIONS', false );\r\n\r\n# Allows maximum 5 post revisions\r\ndefine( 'WP_POST_REVISIONS', 5 );\r\n<\/pre>\n<h2>9. Enable built-in database optimization<\/h2>\n<p>WordPress has a <strong>built-in database optimization feature<\/strong> you can turn on by adding the following line to the wp-config file.<\/p>\n<p>I wrote in detail about how this tool works <a href=\"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/\">in this article<\/a>. The most important thing to note is that the database optimization screen is <strong>available for anyone<\/strong> (even for non-logged in visitors). Enable the feature <strong>only for the period of time you want to run the optimization tool<\/strong>, then don\u2019t forget to disable it.<\/p>\n<pre>\r\n# Turns on database optimization feature\r\ndefine( 'WP_ALLOW_REPAIR', true );\r\n<\/pre>\n<h2>10. Disable automatic updates<\/h2>\n<p>WordPress runs <strong><a href=\"https:\/\/codex.wordpress.org\/Configuring_Automatic_Background_Updates\" target=\"_blank\" rel=\"noopener\">automatic background updates<\/a><\/strong> by default for <strong>minor releases<\/strong> and <strong>translation files<\/strong>.<\/p>\n<p>You can <strong>toggle this feature on and off<\/strong> by setting the values of the <code>AUTOMATIC_UPDATER_DISABLED<\/code> (for all updates) and <code>WP_AUTO_UPDATE_CORE<\/code> (for core updates) constants according to the following rules:<\/p>\n<pre>\r\n# Disables all automatic updates\r\ndefine( 'AUTOMATIC_UPDATER_DISABLED', true );\r\n\r\n# Disables all core updates\r\ndefine( 'WP_AUTO_UPDATE_CORE', false );\r\n\r\n# Enables all core updates, including minor and major releases\r\ndefine( 'WP_AUTO_UPDATE_CORE', true );\r\n\r\n# Enables core updates only for minor releases (default)\r\ndefine( 'WP_AUTO_UPDATE_CORE', 'minor' );\r\n<\/pre>\n<h2>11. Increase PHP memory limit<\/h2>\n<p>Sometimes you may want to <strong>increase the PHP memory limit<\/strong> your hosting provider has allocated to your site, especially if you get the dreaded \u201cAllowed memory size of xxxxxx bytes exhausted\u201d message. To do so, use <strong><code>WP_MEMORY_LIMIT<\/code> for the website<\/strong> and <strong><code>WP_MAX_MEMORY_LIMIT<\/code> for the admin area<\/strong>.<\/p>\n<p>Note that some hosts don\u2019t allow to increase the memory limit manually, in this case contact them and ask them to do it for you.<\/p>\n<pre>\r\n# Sets memory limit for the website\r\ndefine( 'WP_MEMORY_LIMIT', '96M' );\r\n\r\n# Sets memory limit for the admin area\r\ndefine( 'WP_MAX_MEMORY_LIMIT', '128M' );\r\n<\/pre>\n<h2>12. Force SSL login<\/h2>\n<p>To increase website security, you can force users to <strong>log in through <abbr title=\"Secure Sockets Layer\">SSL<\/abbr><\/strong> every time. The <code>FORCE_SSL_ADMIN<\/code> constant makes SSL compulsory for both <strong>user logins<\/strong> and <strong>admin sessions<\/strong>.<\/p>\n<p>Note that the formerly valid <code>FORCE_SSL_LOGIN<\/code> constant was deprecated in WordPress 4.0, so now you always have to use <code>FORCE_SSL_ADMIN<\/code>.<\/p>\n<pre>\r\n# Forces SSL login\r\ndefine( 'FORCE_SSL_ADMIN', true );\r\n<\/pre>\n<h2>13. Disable plugin and theme edits \/ updates<\/h2>\n<p>Administrators can <strong>edit plugin and theme files<\/strong> in the WordPress admin area. You can make your site more secure if you <strong>disable the plugin and theme editors<\/strong> using the <code>DISALLOW_FILE_EDIT<\/code> constant. So, if your site is hacked the hacker won\u2019t have access to your plugin and theme files.<\/p>\n<p>You can also <strong>disable the plugin and theme update feature<\/strong> using <code>DISALLOW_FILE_MODS<\/code>. This way administrators won\u2019t be able to update plugins and themes in the admin area.<\/p>\n<p><code>DISALLOW_FILE_MODS<\/code> also <strong>disables the plugin and theme editor<\/strong>, so if you use it you don\u2019t have to add <code>DISALLOW_FILE_EDIT<\/code>.<\/p>\n<pre>\r\n# Disables the plugin and theme editor\r\ndefine( 'DISALLOW_FILE_EDIT', true );\r\n\r\n# Disables the plugin & theme editor PLUS the plugin & theme update\r\ndefine( 'DISALLOW_FILE_MODS', true );\r\n<\/pre>\n<h2>14. Delete image edits<\/h2>\n<p>Whenever you edit an image, WordPress <strong>saves it in different resolutions<\/strong>. But, if you don\u2019t want to use the earlier sets of images you can <strong>remove them<\/strong> by setting the value of the <code>IMAGE_EDIT_OVERWRITE<\/code> constant to <code>true<\/code>.<\/p>\n<p>As a result, the earlier image files <strong>will be overwritten<\/strong> by the new ones when you edit an image and only the <strong>last set will be saved<\/strong> in the <code>wp-content<\/code> folder.<\/p>\n<pre>\r\n# Cleans up image edits\r\ndefine( 'IMAGE_EDIT_OVERWRITE', true );\r\n<\/pre>\n<h2>15. Disable unfiltered HTML<\/h2>\n<p>Although low-level users (subscribers, contributors, authors) <strong>can\u2019t publish unfiltered HTML<\/strong> in WordPress, editors and administrators are allowed to do so.<\/p>\n<p>By adding the following line of code to your wp-config file, you can increase security by <strong>preventing high-level users from publishing unfiltered HTML<\/strong>.<\/p>\n<pre>\r\n# Disables unfiltered HTML for admins and editors\r\ndefine( 'DISALLOW_UNFILTERED_HTML', true );\r\n<\/pre>\n<p class=\"note\"><strong>Read Also:<\/strong> <a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/strengthen-wordpress-security\/\" rel=\"noopener\">5 Tips to Toughen Up Your WordPress Login Security<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>WordPress admin makes it easy to manage configurations without touching a line of code. These basic configuration settings are then stored in the wp-options table inside the database. But, WordPress also has a separate configuration file, called wp-config.php, that can be used for further customizations. Wp-config is the file where your custom hosting data (database&hellip;<\/p>\n","protected":false},"author":146,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49],"tags":[4663,3428],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>15 wp-config Snippets to Configure WordPress Site - Hongkiat<\/title>\n<meta name=\"description\" content=\"WordPress admin makes it easy to manage configurations without touching a line of code. These basic configuration settings are then stored in the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"15 wp-config Snippets to Configure WordPress Site\" \/>\n<meta property=\"og:description\" content=\"WordPress admin makes it easy to manage configurations without touching a line of code. These basic configuration settings are then stored in the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-22T13:18:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-18T12:11:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-frontend.jpg\" \/>\n<meta name=\"author\" content=\"Anna Monus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anna Monus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/\"},\"author\":{\"name\":\"Anna Monus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\"},\"headline\":\"15 wp-config Snippets to Configure WordPress Site\",\"datePublished\":\"2019-08-22T13:18:34+00:00\",\"dateModified\":\"2022-10-18T12:11:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/\"},\"wordCount\":1264,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wpconfig-snippets-configure-wordpress\\\/wp-config-frontend.jpg\",\"keywords\":[\"ad-divi\",\"wordpress snippets\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/\",\"name\":\"15 wp-config Snippets to Configure WordPress Site - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wpconfig-snippets-configure-wordpress\\\/wp-config-frontend.jpg\",\"datePublished\":\"2019-08-22T13:18:34+00:00\",\"dateModified\":\"2022-10-18T12:11:59+00:00\",\"description\":\"WordPress admin makes it easy to manage configurations without touching a line of code. These basic configuration settings are then stored in the\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wpconfig-snippets-configure-wordpress\\\/wp-config-frontend.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wpconfig-snippets-configure-wordpress\\\/wp-config-frontend.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wpconfig-snippets-configure-wordpress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"15 wp-config Snippets to Configure WordPress Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\",\"name\":\"Anna Monus\",\"description\":\"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.\",\"sameAs\":[\"https:\\\/\\\/www.annalytic.com\\\/\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/anna_monus\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"15 wp-config Snippets to Configure WordPress Site - Hongkiat","description":"WordPress admin makes it easy to manage configurations without touching a line of code. These basic configuration settings are then stored in the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"15 wp-config Snippets to Configure WordPress Site","og_description":"WordPress admin makes it easy to manage configurations without touching a line of code. These basic configuration settings are then stored in the","og_url":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2019-08-22T13:18:34+00:00","article_modified_time":"2022-10-18T12:11:59+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-frontend.jpg","type":"","width":"","height":""}],"author":"Anna Monus","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Anna Monus","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/"},"author":{"name":"Anna Monus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e"},"headline":"15 wp-config Snippets to Configure WordPress Site","datePublished":"2019-08-22T13:18:34+00:00","dateModified":"2022-10-18T12:11:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/"},"wordCount":1264,"commentCount":2,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-frontend.jpg","keywords":["ad-divi","wordpress snippets"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/","url":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/","name":"15 wp-config Snippets to Configure WordPress Site - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-frontend.jpg","datePublished":"2019-08-22T13:18:34+00:00","dateModified":"2022-10-18T12:11:59+00:00","description":"WordPress admin makes it easy to manage configurations without touching a line of code. These basic configuration settings are then stored in the","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-frontend.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/wpconfig-snippets-configure-wordpress\/wp-config-frontend.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/wpconfig-snippets-configure-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"15 wp-config Snippets to Configure WordPress Site"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e","name":"Anna Monus","description":"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.","sameAs":["https:\/\/www.annalytic.com\/"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/anna_monus\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-9Nn","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/37657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/146"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=37657"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/37657\/revisions"}],"predecessor-version":[{"id":63041,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/37657\/revisions\/63041"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=37657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=37657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=37657"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=37657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}