built with claude referral only running on claude + openclaw
← BACK TO THE BLOG

// BLOG

BEFORE AN AI AGENT TOUCHES YOUR SITE

An AI agent can now log in to your WordPress site and change things: rewrite pages, edit Elementor layouts, swap plugins, fix links. That is useful. It also means a bad instruction, a misread page, or a plain mistake can land on a live site in seconds.

None of the safeguards below are exotic. They are the same ones you would want before letting a new contractor touch the site. The difference is that an agent works fast and does not get tired, so mistakes pile up faster than they would by hand. Do the preparation first.

1. Back up the right things, then prove the backup works

A WordPress site is two things: files (themes, plugins, uploads) and a database (your pages, posts, settings, and most Elementor layouts). A backup that only has one of them is not a backup.

  • Database: this holds your content. If an agent edits the wrong thing, this is what you restore.
  • Files: especially wp-content (themes, plugins, uploads) and wp-config.php.
  • Stored somewhere else: not only on the same server. If the server has a problem, a backup sitting beside it goes down with it.
  • Taken right before the session: a backup from three weeks ago will cost you three weeks of edits when you restore it.

The step most people skip is testing the restore. Once, on a copy of the site, restore the backup and confirm the pages load. A backup you have never restored is a hope, not a plan.

2. Work on a staging copy first

Staging is a private duplicate of your site. Let the agent do its first real work there. You see what it does with your actual theme, plugins, and content, and nothing public changes. Many hosts offer one-click staging; if yours does not, a local or subdomain copy works.

Once you are happy with what it did on staging, you can repeat the approved changes on the live site, or push staging live using your host's tools. Either way, a human makes that decision.

3. Give the agent its own account, not yours

Do not hand an agent your admin username and password. Create a separate user for it and connect with a WordPress application password, which is a password made for one connection that you can cancel at any time without changing your own login.

  • Use the lowest role that does the job. An Editor can create and edit pages and posts. It cannot install plugins or change site settings. Start there rather than with Administrator.
  • Use HTTPS. WordPress only offers application passwords on secure sites (or local test environments), for good reason.
  • Know how to revoke it. Under Users, Profile, Application Passwords, you can cancel it in one click. Do this when you are finished, not just when something goes wrong.

4. Make it work in drafts

Tell the agent explicitly to save everything as drafts and not to publish. Better still, enforce it rather than only asking: a setting or plugin that forces new content to stay a draft means a misunderstood instruction cannot go live on its own. Then you read each draft and press Publish yourself.

Be honest about the limit here. Drafts protect you from new pages going live by accident. They do not protect pages that are already published. If the agent edits a live page, the change is live. That is the reason the backup in step 1 matters.

5. Block deletion, and be wary of the dangerous tools

Creating and editing are recoverable. Deleting is much harder to undo. Where you can, do not let the agent delete or trash content at all, and review any tool connection for abilities like running raw database queries or arbitrary PHP code. If you do not need those, leave them switched off. An agent that can do less cannot do as much damage.

6. Check these things before the session

  • Note your current plugin list, theme, WordPress version, and PHP version, so you can see what changed afterwards.
  • Make sure your site is not already half broken. Run a broken link check now, so you can tell old problems from new ones.
  • Check which AI crawlers your site currently allows with the AI Crawl Checker, and keep the result.
  • Review your user list. Remove accounts you no longer use before adding another.
  • Test your forms and, if you sell anything, your checkout, so you know what normal looks like.

7. Check these things after the session

  • Read what changed. Open each page it touched. Do not rely on its summary of what it did.
  • Re-run the broken link check and compare it with your before result.
  • Submit your contact form and, if relevant, run a test order.
  • Look at the site on a phone. Layout problems often show up there first.
  • Check search settings. Make sure nothing set the site or key pages to "noindex," and that your robots.txt and AI crawler rules still say what you meant. Re-run the AI Crawl Checker.
  • Revoke the application password if the work is done.

8. If something does go wrong

Stop the session and cancel the agent's password first, so nothing else changes. Then restore the backup from before the session (for a single page, WordPress's built-in revision history can sometimes bring back an earlier version). If you are tidying up text across a database export, my search and replace tool handles serialized data safely. For database size problems that build up over time, see why WordPress databases bloat.

A short version to keep

  1. Back up files and database, and test one restore.
  2. Try it on staging first.
  3. Give the agent its own low-privilege account.
  4. Drafts only. You press Publish.
  5. No deleting.
  6. Check before and after, and read what actually changed.
  7. Revoke access when you finish.

If you are setting up the agent side too, I covered that in Setting Up OpenClaw Safely, and how I use Claude day to day on sites in Using Claude for Website Ops.

Menu names and settings vary by WordPress version, host, and plugin. Treat this as a checklist of what to cover, and confirm the exact steps against your host's and WordPress's current documentation.

If you would rather not set up staging, backups, and agent access yourself, that is work I do for clients. Tell me about your site and I will tell you honestly what I would put in place first.

GET IN TOUCH →