Opens in a new tab

Independent WordPress hosting guides · Recommended host: Convesio

Start a free trial →

Why Your AI Assistant Keeps Getting Locked Out of WordPress

Security plugins treat bursts of failed REST logins as an attack. Here is why AI tools trigger lockouts, how to recover, and how to stop it happening.
By Shahzad Hasan · November 18, 2026

Halfway through an AI build, everything starts failing with rest_not_logged_in. The password has not changed. Your site has locked the assistant out.

Why it happens

AI tools make many API requests quickly. If a few fail (a wrong username, a revoked password, a header the server strips), a security plugin, LiteSpeed or the host’s firewall sees a burst of failed logins from one address and blocks it. While the block lasts, even correct credentials fail.

How to recover

  1. Stop the tool. Retries usually extend the block.
  2. Wait out the cool-down, or clear the lockout in your security plugin or with your host.
  3. Test once with a single request to /wp-json/wp/v2/users/me.

How to prevent it

  • Allowlist the AI tool’s IP address for /wp-json/ in your security plugin or with your host.
  • Get the credentials right before building: the username is filled in, the password is copied once, and the Authorization header reaches PHP.
  • Make tools stop on authentication errors instead of retrying. On this site, every build run starts with one login test and stops at once if the site refuses.
  • Use one dedicated user for the AI, so its activity is easy to spot in logs.

Related: how to fix rest_not_logged_in.

In this article

Need hosting that scales?

Convesio runs each site in Docker containers with auto scaling and load balancing built in.
Try Convesio free →
Affiliate link: we may earn a commission at no extra cost to you.