AI Wrote My Site. Then the Plugins Broke It.

I rebuilt this site with AI in about a day. Two weeks later I found a footer, hardcoded straight into a theme file by a previous developer, that a single theme update would have erased – along with every edit AI had layered on top of it. That discovery is the whole point of this article: AI and plugins fight over the same files, and you have to decide who owns what before either one touches anything.

The three layers, and who should own them

Every WordPress site has three layers, and AI behaves completely differently in each:

  • Content – posts, pages, product copy. AI is excellent here. The worst case is a bad paragraph, which you fix by editing one paragraph.
  • Presentation – layouts, templates, CSS. AI is good, if the theme gives it structure to work inside. Block editors and page builders are exactly that: structure AI can fill without breaking.
  • State and logic – forms, SEO metadata, redirects, e-commerce. This is plugin territory. AI should not write this from scratch on a live site, because the worst case is not a bad paragraph – it is silent data loss.

Most AI-disasters I have seen or caused come from letting AI work in layer three while believing it was working in layer one.

How “overusing AI” actually breaks things

1. AI edits theme files, the next update wipes them

This is the classic one, and it happened on this very site. Someone wanted a custom footer, so they opened footer.php of the theme and pasted in a whole footer block with inline styles and their own links. It worked. Then the theme shipped an update, and the only thing that survived was the memory of it working. The correct fix – the one I eventually used – is a ten-line mini-plugin that hooks the theme instead of overwriting it.

2. Every AI edit is a full-page rewrite, so code drifts

Ask a model to “change the second paragraph” and it often returns the entire page, slightly rephrased everywhere. Do that ten times and you have ten generations of drift: headings that no longer match, markup patterns that differ page to page, inline styles that exist nowhere else in the theme. I call this code deformation – nothing is broken, everything is slightly wrong, and no human can diff it anymore.

3. AI assumes the admin panel works like HTML

Modern WordPress plugins do not store their settings where AI expects. Yoast, for example, renders its metadata box as a React app – a form POST writes nothing. My first attempt to batch-update descriptions silently “succeeded” while changing zero descriptions. The lesson: AI confidently automates an interface it has never actually inspected.

4. AI recreates plugin functionality inline

Need a redirect? AI happily drops one into functions.php or an .htaccess rule. Need schema? AI inlines JSON-LD into every page. Now you have two sources of truth – the plugin and the hack – and when they disagree, you will spend an afternoon finding out which one is lying.

The reconciliation protocol

Here is the working agreement I now use, in order of how often it saves me:

  • Ownership map first. Write down three lists before any AI session: what AI may write, what only plugins may write, and what is untouchable (theme files, plugin files, .htaccess).
  • AI works through APIs, not files. Content goes in through the REST API. If a change cannot be expressed as an API call, that is a signal it belongs to a plugin or a human.
  • Custom code goes in plugins, never in the theme. A child theme or a mini-plugin survives updates; edits inside the parent theme do not.
  • Backup is a diff, not a vibe. Export the full page set (including raw HTML) before a batch AI change. If you cannot roll back in one command, you are not backed up.
  • After every plugin update, re-run the checklist. Plugin updates can change markup AI depended on. A fixed list of five URLs, checked in five minutes, catches it.
  • Small targeted edits over regenerations. Patch paragraphs, do not regenerate pages. Drift comes from full rewrites.

Where AI genuinely earns its place

None of this is anti-AI. This site exists because AI wrote eleven pages, generated the cover art pipeline, and built the audit scripts – all through APIs, all with backups, none of it touching a theme file. The division that works: AI writes content and reads code; plugins own behaviour; humans own the ownership map. The moment one of those three starts doing another one’s job, you are storing up a bad afternoon.

If you want the workflow version of this – the actual stage-by-stage process from prompt to deployed page – it is in the next article.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top