{"id":570,"date":"2026-10-31T09:34:28","date_gmt":"2026-10-31T04:04:28","guid":{"rendered":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/"},"modified":"2026-11-18T11:30:08","modified_gmt":"2026-11-18T06:00:08","slug":"wordpress-ai-api-key-storage","status":"publish","type":"post","link":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/","title":{"rendered":"Where WordPress Stores Your AI API Key (and How to Keep It Out of the Database)"},"content":{"rendered":"<p><em>Last updated 18 November 2026: the core Secrets API was pulled from WordPress 7.2, so the section on what&#8217;s coming has changed. Tested on WordPress 7.1.4 with the AI plugin 1.4.0 and AI Provider for Anthropic 1.0.5, and checked against the WordPress 7.2 Beta 3 and RC1 source.<\/em><\/p>\n<p>Since WordPress 7.0 there&#8217;s a screen called <strong>Settings &gt; Connectors<\/strong>. You paste an OpenAI, Anthropic or Google API key into it, it says &#8220;Connected&#8221;, and any plugin that uses WordPress&#8217; built-in AI Client can start making requests with it.<\/p>\n<p>The screen also says this, right at the top: &#8220;All of your API keys and credentials are stored here and shared across plugins.&#8221; We wanted to know what &#8220;stored here&#8221; means in practice. So we read the core code, set a real Claude key on a test site, and tried to get it back out the way another plugin would.<\/p>\n<h2>The short answer<\/h2>\n<p>By default the key is saved as a normal WordPress option called <code>connectors_ai_anthropic_api_key<\/code> (or <code>_openai_<\/code>, <code>_google_<\/code>). It sits in your <code>wp_options<\/code> table in plain text, it&#8217;s loaded on every page request, and any plugin on your site can read it with one line of PHP: <code>get_option( 'connectors_ai_anthropic_api_key' )<\/code>.<\/p>\n<p>That&#8217;s not a bug. Sharing the key is the whole point of the screen. But it does mean the key ends up in every database backup and every SQL export, and that every plugin you install can see it.<\/p>\n<p>You can keep it out of the database. You can&#8217;t hide it from other plugins, and nothing in WordPress claims you can.<\/p>\n<h2>What we tested<\/h2>\n<p>We set the same Claude key four ways and checked three things each time: is it readable in the raw database, can an unrelated plugin read it, and what does the REST API show an administrator.<\/p>\n<table>\n<thead>\n<tr>\n<th>How the key is set<\/th>\n<th>In the database (and your backups)<\/th>\n<th>Another plugin can read it<\/th>\n<th>REST API shows<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Connectors screen, default<\/td>\n<td>Yes, plain text<\/td>\n<td>Yes<\/td>\n<td>Last 4 characters only<\/td>\n<\/tr>\n<tr>\n<td>Connectors screen + AI plugin &#8220;Key Encryption&#8221;<\/td>\n<td>Encrypted<\/td>\n<td>Yes, decrypted for it<\/td>\n<td>Last 4 characters only<\/td>\n<\/tr>\n<tr>\n<td><code>ANTHROPIC_API_KEY<\/code> constant in wp-config.php<\/td>\n<td>No<\/td>\n<td>Yes, constants are global<\/td>\n<td>&#8220;configured as a constant&#8221;<\/td>\n<\/tr>\n<tr>\n<td>Environment variable<\/td>\n<td>No<\/td>\n<td>Yes, via <code>getenv()<\/code><\/td>\n<td>Same as constant<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The environment variable row comes from reading the code, not from a separate test. Core checks the same names (<code>ANTHROPIC_API_KEY<\/code>, <code>OPENAI_API_KEY<\/code>, <code>GOOGLE_API_KEY<\/code>) as environment variables first, then as PHP constants, then in the database. The first one it finds wins.<\/p>\n<p>The REST masking is real, by the way. We called <code>\/wp-json\/wp\/v2\/settings<\/code> as an administrator over HTTP and got 16 dots plus the last four characters. One trap if you test this yourself: calling the endpoint from PHP with <code>rest_do_request()<\/code> skips the filter that does the masking, so you&#8217;ll see the full key and think it leaks. Over real HTTP it doesn&#8217;t.<\/p>\n<h2>Option 1: put the key in wp-config.php<\/h2>\n<p>This is the simplest fix and works on any WordPress 7.0+ site. Add a line above the &#8220;That&#8217;s all, stop editing!&#8221; comment:<\/p>\n<pre><code>define( 'ANTHROPIC_API_KEY', 'sk-ant-your-key-here' );<\/code><\/pre>\n<p>Use <code>OPENAI_API_KEY<\/code> or <code>GOOGLE_API_KEY<\/code> for the other two providers. Then, if you&#8217;d already pasted the key into Connectors, remove it there (more on why in a minute). The screen will now show the key as connected and say it&#8217;s configured as a constant, with the field locked:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-connectors-key-constant.png\" alt=\"The WordPress Connectors screen with the Anthropic card showing Connected and the note This API key is configured as a constant\" \/><\/p>\n<p>What this gets you: the key is no longer in the database, so it isn&#8217;t in your backups, a database export you send to a developer, or a staging copy. What it doesn&#8217;t get you: any plugin can still read <code>ANTHROPIC_API_KEY<\/code>. Our throwaway test plugin did exactly that, in one line.<\/p>\n<p>Many hosts also let you set environment variables in the control panel. That&#8217;s even better than wp-config.php if you keep that file in git.<\/p>\n<h2>Option 2: turn on Key Encryption in the AI plugin<\/h2>\n<p>WordPress&#8217; official <a href=\"https:\/\/wordpress.org\/plugins\/ai\/\">AI plugin<\/a> has an experiment called <strong>Key Encryption<\/strong> (Settings &gt; AI). Turn it on and the key moves out of the plain option into an encrypted record using libsodium. The encryption key for that comes from your <code>LOGGED_IN_KEY<\/code> and <code>LOGGED_IN_SALT<\/code> in wp-config.php, or from a <code>WP_SECRETS_KEY<\/code> constant if you define one.<\/p>\n<p>We checked the database after switching it on. The original option was empty, and two new rows had appeared: <code>_secret_ai\/anthropic_api_key<\/code> and <code>_secrets_master_key<\/code>, both ciphertext, neither autoloaded. So a stolen SQL dump on its own no longer gives away the key. Someone would also need your wp-config.php.<\/p>\n<p>But <code>get_option()<\/code> still returned the full key to our test plugin. The plugin&#8217;s own description says it plainly: keys are &#8220;transparently decrypted on read&#8221;. It protects the key at rest. It doesn&#8217;t hide it from code running on your site.<\/p>\n<p>One gotcha we hit. With encryption on, the <code>connectors_ai_anthropic_api_key<\/code> row is empty or missing altogether. The key lives only in the encrypted <code>_secret_ai\/<\/code> row. So when we tried to remove the key with <code>wp option delete<\/code>, WP-CLI said the option didn&#8217;t exist, and WordPress kept using the key: <code>get_option()<\/code> still returned it, and core still reported the key source as &#8220;database&#8221;. Removing the key from the Connectors screen itself (or through the REST API, which is what the screen uses) deleted the encrypted copy properly. So remove keys through the screen, not with WP-CLI or SQL.<\/p>\n<h2>What about stopping other plugins from using it?<\/h2>\n<p>The same AI plugin has a second experiment called <strong>Connector Approval<\/strong>. With it on, a plugin has to be approved by an administrator before it can use a connector. Unapproved attempts show up under Tools &gt; Connector Approvals:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-ai-connector-approval.png\" alt=\"The Connector Approvals screen listing two pending requests to use the Anthropic connector, one from a test plugin and one from the AI plugin, with Approve and Dismiss buttons\" \/><\/p>\n<p>It works, and it&#8217;s stricter than you might expect. It even blocked the AI plugin itself until we approved it. It also blocked AI Engine, which keeps its own separate copy of the key, because the guard matches the key&#8217;s value in outgoing requests, not where the plugin got it from.<\/p>\n<p>Here&#8217;s what our test plugin could still do with Connector Approval on:<\/p>\n<ul>\n<li>Read the key with <code>get_option()<\/code> or the constant: <strong>yes<\/strong>.<\/li>\n<li>Call the Anthropic API with it: <strong>blocked<\/strong> (&#8220;connector has not been approved&#8221;).<\/li>\n<li>Send the key in a POST body to a different server: <strong>not blocked<\/strong>.<\/li>\n<\/ul>\n<p>That last one isn&#8217;t a hole anyone hid. The code&#8217;s own documentation says it looks for the key in request headers and URLs, and that it can&#8217;t catch a plugin that changes the key before sending it. It also only sees requests made through WordPress&#8217; HTTP functions.<\/p>\n<p>And a plugin can switch the guard off. AI Puffer, for example, removes the approval filter around its own provider calls. Its code comments explain why: it uses its own stored key, and a match with the same key in Connectors would be a &#8220;false attribution&#8221;. That&#8217;s a reasonable choice for their plugin. It also shows what the guard is: a filter, which any code on the site can remove.<\/p>\n<h2>The honest bottom line<\/h2>\n<p>A WordPress plugin is PHP running with the same access as WordPress itself. Anything WordPress can decrypt, a plugin can decrypt. So these features protect against two real things, a leaked database and a well-meaning plugin quietly spending your credit. They don&#8217;t protect against a plugin that&#8217;s out to get you. That one you stop by not installing it.<\/p>\n<p>So in practice:<\/p>\n<ol>\n<li><strong>Set a spend limit at the provider.<\/strong> Anthropic and OpenAI both let you cap monthly spend in their consoles; check what your provider offers. It&#8217;s the only control that works no matter what a plugin does.<\/li>\n<li><strong>Use a separate key for each site.<\/strong> If one leaks, you revoke one key and nothing else breaks.<\/li>\n<li><strong>Move the key to wp-config.php or an environment variable<\/strong> so it&#8217;s out of your backups.<\/li>\n<li><strong>Rotate the key when you remove an AI plugin<\/strong> you no longer trust, or when a developer has had access to the site.<\/li>\n<li><strong>Keep the plugin list short.<\/strong> The same advice as always, it just has a price tag attached now. We wrote about <a href=\"https:\/\/jnkplugins.com\/blog\/wordpress-security-updates-2026\/\">how busy WordPress security has been this year<\/a>.<\/li>\n<\/ol>\n<h2>What&#8217;s coming in WordPress 7.2 and 7.3<\/h2>\n<p>When we first wrote this, WordPress 7.2 was set to add a <strong>Secrets API<\/strong> to core: functions like <code>wp_set_secret()<\/code> and <code>wp_get_secret()<\/code> that store values encrypted, keyed by a <code>WP_SECRETS_KEY<\/code> constant. It was in the Beta 3 code.<\/p>\n<p><strong>That&#8217;s off for 7.2.<\/strong> On 17 November the <a href=\"https:\/\/make.wordpress.org\/core\/2026\/11\/11\/the-secrets-api-in-wordpress-7-2\/\">Secrets API dev note<\/a> was updated to say it &#8220;will no longer be shipping with WordPress 7.2&#8221;, after Ryan McCue and Matt Mullenweg objected to the design and the timing. Its lead, Eric Mann, asked for it to aim at 7.3 instead. We grepped the 7.2 RC1 download on 18 November: none of the <code>wp_*_secret()<\/code> functions are in it, and the Connectors screen still saves your key as the plain <code>connectors_ai_&lt;provider&gt;_api_key<\/code> option. So everything above still applies after you update to 7.2. The wp-config.php constant is still the simplest way to keep a key out of the database, and the AI plugin&#8217;s Key Encryption experiment is still the only built-in-ish way to encrypt it. Our <a href=\"https:\/\/jnkplugins.com\/blog\/wordpress-7-2-whats-new\/\">WordPress 7.2 post<\/a> has the rest of the release.<\/p>\n<p>The AI team&#8217;s <a href=\"https:\/\/make.wordpress.org\/ai\/2026\/10\/28\/wordpress-for-the-agentic-web\/\">&#8220;WordPress for the Agentic Web&#8221; post<\/a> (28 October) also pointed at the Secrets API for handling OAuth tokens, as part of letting AI agents connect to sites in 7.3 without Application Passwords. If you&#8217;re curious how agents connect today, see our <a href=\"https:\/\/jnkplugins.com\/blog\/wordpress-mcp-adapter-explained\/\">MCP Adapter explainer<\/a>. And if you&#8217;re picking an AI plugin, our <a href=\"https:\/\/jnkplugins.com\/blog\/best-ai-plugins-wordpress\/\">tested roundup<\/a> lists where each one keeps your key.<\/p>\n<h2>How we tested<\/h2>\n<p>Fresh WordPress 7.1.4 on PHP 8.4 with the AI plugin 1.4.0 and AI Provider for Anthropic 1.0.5. We set a real Claude API key as an option, with the Key Encryption experiment off and on, and as a wp-config.php constant. For each setup we read the raw <code>wp_options<\/code> rows directly, called <code>get_option()<\/code> from a separate test plugin, and fetched <code>\/wp-json\/wp\/v2\/settings<\/code> over HTTP with an administrator&#8217;s Application Password. For Connector Approval we had the test plugin call Anthropic&#8217;s free model-list endpoint, and post the key to a local address, with approval on and off. The Secrets API and Connectors code were checked in the 7.2-beta3-64990 nightly from WordPress.org on 29 October. Nothing was tested on a live site.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Is it safe to put my OpenAI or Claude API key in WordPress?<\/h3>\n<p>It&#8217;s as safe as the plugins you run. In the Connectors screen the key is stored in plain text in the database and every plugin can read it. Put it in wp-config.php to keep it out of backups, set a spend limit at the provider, and use a separate key for each site.<\/p>\n<h3>Where does WordPress store the Connectors API key?<\/h3>\n<p>In the wp_options table, as connectors_ai_anthropic_api_key, connectors_ai_openai_api_key or connectors_ai_google_api_key. If an environment variable or PHP constant with the provider&#8217;s name (for example ANTHROPIC_API_KEY) exists, WordPress uses that instead and nothing is saved in the database.<\/p>\n<h3>Does the AI plugin&#8217;s Key Encryption stop other plugins reading my key?<\/h3>\n<p>No. It encrypts the key in the database, which protects backups and database dumps, but it decrypts the key automatically whenever any code calls get_option(). It protects the key at rest, not from plugins running on your site.<\/p>\n<p><script type=\"application\/ld+json\">\n{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"Is it safe to put my OpenAI or Claude API key in WordPress?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"It's as safe as the plugins you run. In the Connectors screen the key is stored in plain text in the database and every plugin can read it. Put it in wp-config.php to keep it out of backups, set a spend limit at the provider, and use a separate key for each site.\"}},{\"@type\":\"Question\",\"name\":\"Where does WordPress store the Connectors API key?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"In the wp_options table, as connectors_ai_anthropic_api_key, connectors_ai_openai_api_key or connectors_ai_google_api_key. If an environment variable or PHP constant with the provider's name (for example ANTHROPIC_API_KEY) exists, WordPress uses that instead and nothing is saved in the database.\"}},{\"@type\":\"Question\",\"name\":\"Does the AI plugin's Key Encryption stop other plugins reading my key?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. It encrypts the key in the database, which protects backups and database dumps, but it decrypts the key automatically whenever any code calls get_option(). It protects the key at rest, not from plugins running on your site.\"}}]}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last updated 18 November 2026: the core Secrets API was pulled from WordPress 7.2, so the section on what&#8217;s coming has changed. Tested on WordPress 7.1.4 \u2026<\/p>\n","protected":false},"author":1,"featured_media":571,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jnk_linkweave_no_autolink":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-570","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Where WordPress Stores Your AI API Key (Connectors, Tested) - JnK Plugins Blog<\/title>\n<meta name=\"description\" content=\"WordPress saves Connectors API keys in plain text and every plugin can read them. We tested wp-config constants, Key Encryption and Connector Approval.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Where WordPress Stores Your AI API Key (Connectors, Tested) - JnK Plugins Blog\" \/>\n<meta property=\"og:description\" content=\"WordPress saves Connectors API keys in plain text and every plugin can read them. We tested wp-config constants, Key Encryption and Connector Approval.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/\" \/>\n<meta property=\"og:site_name\" content=\"JnK Plugins Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-31T04:04:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-18T06:00:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-ai-api-key-storage.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Suresh K Meena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Suresh K Meena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/\"},\"author\":{\"name\":\"Suresh K Meena\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#\\\/schema\\\/person\\\/601d025989fe7e0c285dd7fff36d9feb\"},\"headline\":\"Where WordPress Stores Your AI API Key (and How to Keep It Out of the Database)\",\"datePublished\":\"2026-10-31T04:04:28+00:00\",\"dateModified\":\"2026-11-18T06:00:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/\"},\"wordCount\":1840,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wordpress-ai-api-key-storage.png\",\"articleSection\":[\"Guides\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/\",\"name\":\"Where WordPress Stores Your AI API Key (Connectors, Tested) - JnK Plugins Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wordpress-ai-api-key-storage.png\",\"datePublished\":\"2026-10-31T04:04:28+00:00\",\"dateModified\":\"2026-11-18T06:00:08+00:00\",\"description\":\"WordPress saves Connectors API keys in plain text and every plugin can read them. We tested wp-config constants, Key Encryption and Connector Approval.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wordpress-ai-api-key-storage.png\",\"contentUrl\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wordpress-ai-api-key-storage.png\",\"width\":1200,\"height\":630,\"caption\":\"Where WordPress stores your AI API key: featured card\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wordpress-ai-api-key-storage\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Where WordPress Stores Your AI API Key (and How to Keep It Out of the Database)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/\",\"name\":\"JnK Plugins\",\"description\":\"Guides, comparisons, and tutorials for our WordPress plugins\",\"publisher\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#organization\"},\"alternateName\":\"JnK Plugins Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#organization\",\"name\":\"JnK Plugins\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/jnkplugins-jk-logo-512.png\",\"contentUrl\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/jnkplugins-jk-logo-512.png\",\"width\":512,\"height\":512,\"caption\":\"JnK Plugins\"},\"image\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.youtube.com\\\/@JnKPlugins\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/jnkplugins\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#\\\/schema\\\/person\\\/601d025989fe7e0c285dd7fff36d9feb\",\"name\":\"Suresh K Meena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g\",\"caption\":\"Suresh K Meena\"},\"description\":\"Suresh has been building web apps for over 15 years and is the founder of JnK Plugins, where he makes honest, no-bloat WordPress tools that keep your data in your own hands. Away from the keyboard he is usually at a chessboard, thinking a few moves ahead \u2014 and he is always ready to learn something new.\",\"sameAs\":[\"https:\\\/\\\/jnkplugins.com\"],\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/author\\\/suresh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Where WordPress Stores Your AI API Key (Connectors, Tested) - JnK Plugins Blog","description":"WordPress saves Connectors API keys in plain text and every plugin can read them. We tested wp-config constants, Key Encryption and Connector Approval.","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:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/","og_locale":"en_US","og_type":"article","og_title":"Where WordPress Stores Your AI API Key (Connectors, Tested) - JnK Plugins Blog","og_description":"WordPress saves Connectors API keys in plain text and every plugin can read them. We tested wp-config constants, Key Encryption and Connector Approval.","og_url":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/","og_site_name":"JnK Plugins Blog","article_published_time":"2026-10-31T04:04:28+00:00","article_modified_time":"2026-11-18T06:00:08+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-ai-api-key-storage.png","type":"image\/png"}],"author":"Suresh K Meena","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Suresh K Meena","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#article","isPartOf":{"@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/"},"author":{"name":"Suresh K Meena","@id":"https:\/\/jnkplugins.com\/blog\/#\/schema\/person\/601d025989fe7e0c285dd7fff36d9feb"},"headline":"Where WordPress Stores Your AI API Key (and How to Keep It Out of the Database)","datePublished":"2026-10-31T04:04:28+00:00","dateModified":"2026-11-18T06:00:08+00:00","mainEntityOfPage":{"@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/"},"wordCount":1840,"commentCount":0,"publisher":{"@id":"https:\/\/jnkplugins.com\/blog\/#organization"},"image":{"@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#primaryimage"},"thumbnailUrl":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-ai-api-key-storage.png","articleSection":["Guides"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/","url":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/","name":"Where WordPress Stores Your AI API Key (Connectors, Tested) - JnK Plugins Blog","isPartOf":{"@id":"https:\/\/jnkplugins.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#primaryimage"},"image":{"@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#primaryimage"},"thumbnailUrl":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-ai-api-key-storage.png","datePublished":"2026-10-31T04:04:28+00:00","dateModified":"2026-11-18T06:00:08+00:00","description":"WordPress saves Connectors API keys in plain text and every plugin can read them. We tested wp-config constants, Key Encryption and Connector Approval.","breadcrumb":{"@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#primaryimage","url":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-ai-api-key-storage.png","contentUrl":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/10\/wordpress-ai-api-key-storage.png","width":1200,"height":630,"caption":"Where WordPress stores your AI API key: featured card"},{"@type":"BreadcrumbList","@id":"https:\/\/jnkplugins.com\/blog\/wordpress-ai-api-key-storage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jnkplugins.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Where WordPress Stores Your AI API Key (and How to Keep It Out of the Database)"}]},{"@type":"WebSite","@id":"https:\/\/jnkplugins.com\/blog\/#website","url":"https:\/\/jnkplugins.com\/blog\/","name":"JnK Plugins","description":"Guides, comparisons, and tutorials for our WordPress plugins","publisher":{"@id":"https:\/\/jnkplugins.com\/blog\/#organization"},"alternateName":"JnK Plugins Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jnkplugins.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jnkplugins.com\/blog\/#organization","name":"JnK Plugins","url":"https:\/\/jnkplugins.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jnkplugins.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/08\/jnkplugins-jk-logo-512.png","contentUrl":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/08\/jnkplugins-jk-logo-512.png","width":512,"height":512,"caption":"JnK Plugins"},"image":{"@id":"https:\/\/jnkplugins.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.youtube.com\/@JnKPlugins","https:\/\/www.linkedin.com\/company\/jnkplugins\/"]},{"@type":"Person","@id":"https:\/\/jnkplugins.com\/blog\/#\/schema\/person\/601d025989fe7e0c285dd7fff36d9feb","name":"Suresh K Meena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g","caption":"Suresh K Meena"},"description":"Suresh has been building web apps for over 15 years and is the founder of JnK Plugins, where he makes honest, no-bloat WordPress tools that keep your data in your own hands. Away from the keyboard he is usually at a chessboard, thinking a few moves ahead \u2014 and he is always ready to learn something new.","sameAs":["https:\/\/jnkplugins.com"],"url":"https:\/\/jnkplugins.com\/blog\/author\/suresh\/"}]}},"_links":{"self":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts\/570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/comments?post=570"}],"version-history":[{"count":1,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts\/570\/revisions"}],"predecessor-version":[{"id":829,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts\/570\/revisions\/829"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/media\/571"}],"wp:attachment":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/media?parent=570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/categories?post=570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/tags?post=570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}