An AI-Built or AI-Edited Website Broke: What to Check
Code written by AI tools can run but still be unsafe or fragile. Back up, read errors, and review the risky parts.
AI tools can write a page or plugin in minutes. They can also write code that breaks on your server or opens security holes. If a site stopped working after AI-made changes, do this.
1. Stop editing live
Go back to the last working backup, or copy the site to a test location. See restore guide.
2. Read the real error
Turn on error logging, see debug log guide or PHP errors. Paste the exact error back to the AI with your PHP and WordPress versions.
3. Common problems
- Code written for a different PHP version, see deprecated errors
- Wrong file paths, see include path errors
- Extra characters before opening tags causing headers already sent
- Pasted code into the theme's functions file with a syntax error, see parse error guide
4. Review security
Check that forms validate input, database queries use prepared statements (guide), no passwords or keys sit in the code, and uploads are restricted.
5. Get a human review
For anything that takes payments or stores customer data, have an experienced developer review the code before it goes live.
Related guides
- WordPress Login Page Keeps Reloading or Redirecting (Can't Log In)
- WordPress User Roles Explained: Administrator, Editor, Author, Contributor, Subscriber
- Unknown Administrator Users Appeared in WordPress: What to Do
- Lost Your Phone or Two-Factor Code for WordPress: How to Get Back In