How to Connect ChatGPT to WordPress Securely (Step-by-Step Guide 2026)

How to connect ChatGPT to WordPress securely with OAuth and MCP

ChatGPT can now work inside your WordPress site: draft blog posts, build pages, check site health, update plugins, look after your theme and fill in your SEO fields. But giving an AI the keys to your site is risky if you do it the wrong way. Pasting your admin password into a chat is the wrong way.

In this guide I’ll show you how to connect ChatGPT to WordPress securely with an MCP connector plugin and OAuth sign-in, step by step, with a screenshot for every step. Then I’ll show you exactly how to use it for posts, pages, site optimization, plugins, themes and SEO, without ever handing over your password.

What You Can Do After You Connect ChatGPT to WordPress

TaskExample promptPermission needed
Write a blog post“Write a 1,200-word post on X and save it as a draft.”Create and edit drafts (Editor)
Create a page“Create a Services page as a draft with 3 sections and an FAQ.”Create and edit drafts (Editor)
Optimize your site“Check site health, images and plugins. Change nothing yet.”Read-only, then media edits
Manage plugins“Which plugins need updates? Update only minor versions.”Manage plugins (Administrator)
Manage your theme“Is a child theme active? Any theme updates?”Manage themes (Administrator)
Do SEO“Set the SEO title, meta description and focus keyword for draft 4012.”SEO fields (Editor)

How the Secure Connection Works (in Plain English)

ChatGPT talks to outside tools through MCP (Model Context Protocol). You install an MCP connector plugin on WordPress, and it gives ChatGPT a list of tools such as “create post” or “list plugins”. You add your site to ChatGPT as a custom app (earlier called a connector).

The secure part is OAuth. Instead of typing a password into ChatGPT, you get sent to your own WordPress login page, sign in, and click Approve. WordPress then gives ChatGPT a short-lived token that only works for the tools you allowed, and you can revoke it with one click. This is the same way “Sign in with Google” works.

Three layers of protection

1. A limited WordPress user: ChatGPT can never do more than that user’s role allows.

2. Tool permissions in the plugin: you switch off anything risky, like deleting or publishing.

3. Confirmation in ChatGPT: ChatGPT asks you before every action that changes something.

What You Need Before You Start

  • A self-hosted WordPress site on HTTPS, ideally with a staging copy
  • A paid ChatGPT plan that allows developer mode (check OpenAI’s help pages for your plan; on Business and Enterprise your workspace admin must allow it)
  • The ChatGPT web app on a computer. Custom apps are set up on chatgpt.com, not in the phone app
  • An MCP connector plugin that supports OAuth 2.1 (Step 3 shows what to look for)
  • A fresh backup of your files and database

Need hosting with SSL, backups and staging?

I host manjray.com on Hostinger. Every WordPress plan includes free SSL, and Business plans and higher add daily backups and a one-click staging site, which covers everything this guide needs. The Hostinger Black Friday sale runs until 14 December 2026 with up to 85% off. See my Hostinger Black Friday 2026 deals and catches before you buy.

Part 1: Connect ChatGPT to WordPress Securely

Step 1: Back Up Your Site and Update Everything

Before you give any tool write access, make sure you can undo its mistakes. Create a full backup of your files and database, either with your host’s backup tool or a backup plugin, and store a copy off the server.

Then go to Dashboard → Updates and update WordPress, your plugins and your theme. Old versions are the most common way sites get hacked, and new MCP plugins often need a recent WordPress version. If your host offers a staging site, do the whole setup there first.

Step 1: back up your WordPress site and update core, plugins and themes before connecting ChatGPT

Step 2: Create a Dedicated WordPress User for ChatGPT

Don’t connect ChatGPT with your own admin account. Go to Users → Add New User and create a separate user, for example chatgpt-editor, with its own email address and a strong generated password.

Choose the role carefully:

  • Editor is enough for posts, pages, media and SEO. Start here.
  • Administrator is only needed for plugin and theme work (Steps 13 and 14). Give the role only while you do that work, then switch it back.

A separate user also means every change ChatGPT makes shows up under its own name in your post lists and logs.

Step 2: add a new WordPress user called chatgpt-editor with the Editor role and a strong password

Step 3: Install an MCP Connector Plugin That Supports OAuth

Go to Plugins → Add New and search for an MCP plugin. There are several, and new ones appear every month, so check these points before you click Install:

  • OAuth 2.1 with PKCE. ChatGPT custom apps sign in with OAuth (or no authentication at all). Plugins that only support application passwords won’t work with ChatGPT.
  • Per-tool permissions, so you can switch off risky tools.
  • A Connected apps screen with a Revoke button.
  • An activity log of every tool call.
  • Recent updates and a known developer. Never install a “nulled” copy of a paid plugin.

Install and activate the plugin.

Step 3: search for and install a WordPress MCP connector plugin with OAuth 2.1 support

Step 4: Turn On Only the Tools You Need, Then Copy the MCP URL

Open the plugin’s settings page. Most MCP plugins group their tools, for example posts, media, SEO, plugins and themes. For your first connection, turn on only:

  • Read posts, pages and media
  • Create and edit drafts
  • Upload media
  • SEO title, description and keyword

Leave manage plugins, manage themes, publish without review and permanent delete switched off. You can turn a group on later, just for the task that needs it.

Then copy the MCP server URL. It usually looks like https://yoursite.com/wp-json/plugin-name/mcp. You’ll paste it into ChatGPT in Step 7.

Step 4: enable only safe MCP tool permissions and copy the MCP server URL

Step 5: Stop Your Cache and Firewall from Blocking ChatGPT

This is the step most guides skip, and it’s the #1 reason ChatGPT says it “couldn’t connect”. OAuth needs fresh, uncached replies. If your CDN or cache plugin serves a cached copy, or your firewall shows ChatGPT a bot challenge, the sign-in fails.

In your CDN (for example Cloudflare) create a rule that bypasses the cache for these paths, and skip the bot challenge for them only:

  • your MCP route, for example /wp-json/plugin-name/
  • /.well-known/ (the OAuth discovery files)
  • the plugin’s consent screen (often under /wp-admin/admin-post.php, which most caches already skip)

Add the same paths to the “Do not cache” list in your page cache too (LiteSpeed Cache, WP Rocket or your host’s cache).

Step 5: create a cache rule that bypasses cache for the MCP route and OAuth well-known paths

Step 6: Turn On Developer Mode in ChatGPT

Open chatgpt.com in your browser and go to Settings. Find the Developer mode switch and turn it on. OpenAI has moved this setting several times. Depending on your account it is under Apps (or Plugins) → Advanced settings, or under Security and login.

While you are there, turn on multi-factor authentication for your ChatGPT account. Your ChatGPT login will soon have access to your website, so protect it like you protect your WordPress admin.

Step 6: turn on Developer mode and multi-factor authentication in ChatGPT settings

Can’t find Developer mode?

Developer mode only shows on the web app. On a Business or Enterprise workspace, an admin has to allow it first. Some plans don’t include it at all, so check OpenAI’s help center for your plan.

Step 7: Create the WordPress App in ChatGPT

Back in Settings, open Apps (or Plugins) and click Create (sometimes “+” or “Create MCP app”). Fill in the form:

  1. Name: something clear like “My WordPress site”.
  2. Description: what it does, for example “Drafts posts and pages, SEO fields and site checks”.
  3. MCP server URL: paste the URL from Step 4.
  4. Authentication: choose OAuth. Never choose “No authentication” for a site that can be changed.

Tick the box that says you trust the app, and click Create. ChatGPT now sends you to your site to sign in.

Step 7: create a new MCP app in ChatGPT with the WordPress MCP server URL and OAuth authentication

Step 8: Sign In and Approve Access on Your Own Site

A WordPress consent screen opens. Before you click anything:

  • Check the address bar. It must show your own domain with a padlock. If it shows anything else, close the window.
  • Sign in as the ChatGPT user from Step 2, not as your main admin. If you are already logged in as admin, log out first or use a private window.
  • Read the permission list. It should match the tools you turned on in Step 4.

Click Approve. You are sent back to ChatGPT, and the app shows as connected. Notice that you never typed a WordPress password into ChatGPT.

Step 8: WordPress OAuth consent screen where you approve ChatGPT access as the chatgpt-editor user

Step 9: Test the Connection with a Read-Only Prompt

Start a new chat, pick your app from the + or Tools menu, and ask something that can’t change anything:

Use My WordPress site. List my 5 latest posts with status and date. Don’t change anything.

Look for the tool call line above the answer (for example list_posts). That proves ChatGPT read your real site instead of guessing. If you get an error instead, go back to Step 5 and check your cache and firewall rules, then check the plugin is active.

Step 9: test the ChatGPT WordPress connection by listing the latest posts

Part 2: Use ChatGPT to Manage Your WordPress Site

Golden rule: ChatGPT drafts, you publish. Keep “publish without review” switched off and read every confirmation before you click Confirm.

Step 10: Write a Blog Post and Save It as a Draft

Give ChatGPT a full brief. The more specific you are, the less you’ll need to rewrite:

Use My WordPress site. Write a 1,200-word beginner post “How to Speed Up WordPress”. Use H2 headings, one comparison table and a 4-question FAQ. Write in a friendly, simple tone. Save it as a draft in the category Tutorials.

Before it saves, ChatGPT shows a confirmation with the tool name and the details. Check that the status says draft, then click Confirm. Open the preview link, fact-check everything, and add your own experience and screenshots. AI drafts are a starting point. Your expertise is what makes a post rank.

Step 10: ChatGPT writes a WordPress blog post and asks for confirmation before saving it as a draft

Step 11: Create a New Page

Pages work the same way. Describe each section, the slug and where buttons should link:

Use My WordPress site. Create a Services page as a draft: a hero line, 3 service blocks with short descriptions, an FAQ and a contact button linking to /contact/. Slug: services.

The new page appears in Pages as a draft by the ChatGPT user. If you use a page builder like Divi or Elementor, ask ChatGPT for clean block content and do the layout and design in your builder. Builders store layouts in their own format, which AI tools often get wrong.

Step 11: a Services page created by ChatGPT appears as a draft in WordPress Pages

Step 12: Optimize Your Site with a Health Check

Ask for a report first, and tell ChatGPT not to change anything yet:

Use My WordPress site. Check site health, images and plugins. List every problem with a suggested fix. Change nothing yet.

You’ll typically get a list like: images missing alt text, oversized images, inactive plugins, an old PHP version and Site Health warnings. Then approve fixes one at a time. Adding alt text or compressing images is safe. Server-level fixes, like upgrading PHP or turning on page caching, are done in your hosting panel, not by ChatGPT. If your host can’t give you PHP 8.3 or server caching, it may be time to move. Hostinger’s Black Friday deal makes this a good time to switch.

Step 12: ChatGPT runs a WordPress site health check and lists issues with suggested fixes

Step 13: Manage Plugins (Audit, Update, Deactivate)

Plugin tools are powerful, so switch on the Manage plugins group (Step 4) and give the ChatGPT user the Administrator role only for this task. Then ask:

Use My WordPress site. Which plugins need updates and which are inactive? Update only the minor updates, then check that the homepage and checkout still load.

Approve minor updates (for example 5.9.2 → 5.9.3). Test major updates (10.x → 11.0) on staging first. Deleting inactive plugins is good for security, but make that decision yourself. When you’re done, switch the plugin tools off and set the user back to Editor.

Step 13: ChatGPT audits WordPress plugins and asks for confirmation before updating minor versions

Step 14: Manage Your Theme Safely

Ask ChatGPT what is running:

Use My WordPress site. Which theme is active? Is it a child theme? Are any theme updates waiting?

If you use a child theme, updating the parent theme won’t erase your custom code. Update only after a fresh backup. Small changes are fine to hand over: the site title, tagline, menus and small custom CSS snippets. Never let an AI switch your live theme. Keep any “switch theme” tool off and try new themes on staging.

Step 14: check the active WordPress child theme and theme updates through ChatGPT

Step 15: Do On-Page SEO

Use your own keyword research (Google Search Console, Rank Math, Ahrefs or similar), then give ChatGPT the keyword and the limits:

For draft 4012, set the focus keyword “speed up wordpress”, an SEO title under 60 characters, a meta description under 155 characters, a short slug, alt text for every image and 3 internal links to related posts.

Check the search preview: would you click it? If your MCP plugin supports your SEO plugin’s fields (Rank Math, Yoast or All in One SEO), the title, description and keyword are saved straight into them. Once a month, ask for a site-wide SEO audit: missing meta descriptions, thin posts, missing alt text and broken internal links. If you use Claude as well, see my guide to WordPress SEO with Claude Code and MCP.

Step 15: ChatGPT sets the SEO title, meta description, focus keyword and internal links for a WordPress draft

Step 16: Review the Activity Log and Revoke Access Anytime

Open the plugin’s Connected apps screen once a week. You’ll see every connected app, which user it acts as and when it was last used. The activity log shows each tool call. Blocked calls (like a delete attempt when delete is switched off) show your permissions are doing their job.

If you lose your laptop, share a chat by mistake or simply stop using the connection, click Revoke. Access stops at once. Then also remove the app in ChatGPT settings.

Step 16: review the MCP activity log and revoke ChatGPT access in WordPress

Security Checklist

Do thisWhy
Use OAuth, never “No authentication”No password is shared, and tokens expire and can be revoked.
Connect a dedicated Editor userChatGPT can’t do more than the role allows.
Turn off delete, publish and theme switchingA bad or injected prompt can’t cause permanent damage.
Read every confirmationYou stay the final approval for every change.
Don’t let ChatGPT read untrusted content and act on itInstructions hidden in comments, emails or web pages (prompt injection) can try to trick the AI.
Keep backups and check the logYou can see and undo anything.

Troubleshooting

  • “Couldn’t connect” or the sign-in loops: your cache or firewall is in the way (Step 5). Purge all caches after adding the rules.
  • “Create” is missing in ChatGPT: Developer mode is off, you’re in the phone app, or your workspace admin blocked it (Step 6).
  • Consent screen shows the wrong user: log out of WordPress or use a private window, then sign in as the ChatGPT user.
  • A tool you need is missing: switch on that tool group in the plugin settings, then refresh the app in ChatGPT settings so it reloads the tool list.
  • Error 500 or 401 on every request: another plugin or a security plugin may block REST API requests. Test on staging with other plugins disabled and contact the MCP plugin’s support.

Frequently Asked Questions

Is it safe to connect ChatGPT to WordPress?

Yes, if you use OAuth, a dedicated low-privilege user, limited tool permissions and ChatGPT’s confirmations. Never paste your admin password or an application password into a chat.

Do I need a paid ChatGPT plan?

Adding your own MCP app needs developer mode, which is only on certain paid plans and only in the web app. Check OpenAI’s help center for your plan.

Can ChatGPT publish posts on its own?

Only if you allow it. Keep “publish without review” switched off so ChatGPT can only save drafts, and publish yourself after checking the post.

Does this work with WordPress.com?

This guide is for self-hosted WordPress (WordPress.org), where you can install plugins. WordPress.com sites have their own options depending on the plan.

Can ChatGPT edit Divi or Elementor layouts?

It can create content, but page builders store layouts in their own format. Ask ChatGPT for text and block content, then design the layout in your builder.

How do I disconnect ChatGPT from WordPress?

Click Revoke in the plugin’s Connected apps screen, then delete the app in ChatGPT settings. For extra safety, also delete or lock the dedicated ChatGPT user.

Final Thoughts

Connecting ChatGPT to WordPress can save you hours every week on drafts, pages, SEO fields and maintenance checks. The secure way takes only a few extra minutes: a dedicated user, an OAuth MCP plugin with the risky tools switched off, a cache rule and the habit of reading every confirmation. Start with read-only prompts, move on to drafts, and only switch on plugin and theme tools when you need them.

0 Comments