Guides/Plugins and tools/Plugins/Use AI to build themes and plugins safely

Use AI to build themes and plugins safely

Last reviewed on June 26, 2026

You can use AI tools to customize your WordPress.com site, from small text and design tweaks to building custom themes and plugins, even if you don’t write code yourself. This practice, sometimes called vibe coding, works best when you test bigger changes away from your live site, give the AI clear limits, and know how to undo a change when something breaks.

Know which AI changes need extra care

Some AI changes need extra care, but most everyday ones don’t. The caution in this guide is for more significant changes—building or installing themes and plugins, not small content and design edits. Here’s how to tell them apart:

  • Safe on your live site: everyday content and design changes, like editing text, swapping images, or adjusting your page layout with blocks. This includes changes you make with WordPress.com’s built-in AI tools or by connecting your own AI tool through the MCP setting. These tools change your content, not your site’s code, so they won’t break your site the way custom code can.
  • Use extra care: building a theme or plugin, installing a custom theme or plugin, or following an AI’s recommendation to install one. These change your site’s code and can break it, and they’re what the rest of this guide covers.

Is your site already broken? If an AI change crashed your site or locked you out, go straight to Recover when an AI change breaks your site.

Test before you touch your live site

Build and test AI-generated changes somewhere other than your live site. Most broken-site problems happen when someone puts AI-written code straight onto a live site with no testing. Testing first means a mistake never reaches your visitors.

You have two safe places to test:

  • WordPress Studio is a free app you install on your computer. It runs a complete WordPress site on your own machine, with a built-in AI assistant, so you can build and test before anything goes live. Studio is free on any plan. Learn more about WordPress Studio.
  • A staging site is a private copy of your live site, hosted on WordPress.com. You test changes on it without affecting your live site. Staging sites are available on the Business and Commerce plans. Learn how to use a staging site to troubleshoot errors.

If you already have a site and want to test with Studio, choose “Connect a site” to bring a copy into Studio. Selecting “Build a new site” creates a separate new site instead.

Move a working change to your live site

How you move a working change to your live site depends on where you tested it.

If you built in Studio, move the working change to your live site. On the Business and Commerce plans, use Studio Sync to push your changes, which covers both themes and plugins. On the Personal and Premium plans, upload your theme under Appearance → Themes, or upload your plugin as a .zip file under Plugins.

If you tested on a staging site, sync it to your live site once the change works. Syncing overwrites matching content on your live site, so review what you’re pushing first.

Work with AI safely

Give the AI clear limits before it changes anything, and read what it produces before you apply it. AI tools often write code that looks correct but changes parts of WordPress it shouldn’t. Clear limits prevent most broken-site problems.

Include these instructions when you ask an AI tool to build or change a theme or plugin. You can paste them as written, even if some terms are new to you:

  • Do not change the login page, the wp-admin area (your site’s admin screens), or how people log in. This is the most common cause of being locked out of your own site.
  • Make one change at a time, and explain what each change does.
  • Keep changes in a child theme or a separate plugin, so each change is easy to undo.
  • Protect each code file so it can’t be opened directly in a web browser.
  • Do not install new plugins or recommend them without telling you what they do first. An AI-recommended plugin can change your site’s settings in ways you can’t easily reverse.
  • Follow the official WordPress coding standards in the plugin developer guidelines.

If you don’t understand what a change does, ask the AI to explain it in plain language before you add it to your site. When you build in Studio, turn on error display so mistakes appear as you work—see debugging in Studio.

Here is a starter prompt for a first change:

Create a child theme of my site’s currently active theme, and use that as the parent. Put all your changes in the child theme only — don’t edit the parent theme’s files. For a first change, add a small custom footer line that reads “Built with care.”

Here is the same request with the safety limits added—what a careful instruction looks like:

Create a child theme of my site’s currently active theme, and put all changes in the child theme only. Leave the login page, wp-admin, and login behavior untouched. Make one change at a time and explain what each one does. Add a check to the top of each PHP file that stops it from running if opened directly, and follow the WordPress coding standards. For a first change, add a small custom footer line that reads “Built with care.”

The examples use a child theme, but the same works for a plugin: ask the AI to build the feature as a separate plugin with the same limits. Child themes and custom plugins are both available on the Personal plan and above; for the full steps, see create a child theme.

Recover when an AI change breaks your site

If an AI change breaks your site, stop and undo the most recent change. Do not ask the AI to fix it—re-prompting often makes the problem worse. Work through these fixes in order. You can do all of them from your WordPress.com dashboard, even when your site’s own wp-admin area is unreachable.

  1. Deactivate your plugins. Plugins are the most common cause, including a plugin that connects an AI tool to your site, which can even block your dashboard. Deactivating that plugin restores your access. Learn how to deactivate a plugin.
  2. Switch to a default theme, such as Twenty Twenty-Five. If your site broke after a theme change, switching themes removes the problem. Learn how to change your theme.
  3. Restore a backup. On the Business and Commerce plans, you can restore your site to a point before the change. On the Personal and Premium plans, automatic backups aren’t available—undo the change with the steps above, or re-upload the working copy from WordPress Studio. To protect your content beforehand, export it at any time, on any plan.

For full step-by-step troubleshooting, including how to find which plugin or theme caused the problem, see Solve problems with plugins and themes. If you still can’t reach your dashboard, follow the steps to resolve Jetpack errors.

If none of these fix your site, stop making changes—continuing to re-prompt the AI can make recovery harder. Contact support or ask in the forums and describe what changed before the site broke.

Get help when you’re stuck

WordPress.com support does not troubleshoot custom code, so plan for another path when a build gets stuck. The options below cover both smaller changes and full custom work.

For a small change, you may not need a whole theme or plugin:

For bigger changes, there are numerous plugins and themes developed by experts to choose from.

If you’re stuck building what you want, you can hire an expert to build it for you. A professional developer can create the theme or plugin you need or finish a build you started with an AI tool. Learn how to work with a developer, or explore WordPress.com’s website design services.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!