// BLOG
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.
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.
wp-content (themes, plugins, uploads) and wp-config.php.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.
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.
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.
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.
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.
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.
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 →