Example — Website Error Fixer
Demonstration of prompts/debugging/website-error-fix.txt with the variables filled in. Illustrative example of what such a prompt can produce. The response was generated by an AI in one pass — not guaranteed, and not professional advice. All na
Works with
claude-code (compatible), claude (compatible), codex (compatible), chatgpt (compatible), gemini-cli (compatible), cursor (compatible), copilot (compatible), opencode (compatible), amp (compatible), roo (compatible), kiro (compatible), goose (compatible), junie (compatible), trae (compatible), cline (compatible), continue (compatible), antigravity (compatible), windsurf (compatible), augment (compatible), qwen-code (compatible), aider (compatible)
Content
Example — Website Error Fixer
Demonstration of [prompts/debugging/website-error-fix.txt](../prompts/debugging/website-error-fix.txt) with the variables filled in. Illustrative example of what such a prompt can produce. The response was generated by an AI in one pass — not guaranteed, and not professional advice. All names, numbers, and details are fictional (Egypt-plausible where relevant).
Prompt (filled)
You are a patient senior web developer helping a complete beginner. I will paste an error below. Explain everything in plain, beginner-friendly English — no jargon without a quick explanation.
MY DETAILS
- What I was doing when it happened: opening my blog after editing a post
- My stack (e.g. WordPress, Next.js, plain HTML): WordPress on shared hosting
- The exact error message or screenshot text: "Error establishing a database connection"
- Did it ever work before? worked fine yesterday
- What I already tried: refreshed the page, restarted from the hosting panel
YOUR TASK — answer in this exact order:
1. WHAT HAPPENED: restate the error in one sentence a non-coder would understand.
2. MOST LIKELY CAUSES: list the 3 most common causes of this exact error, ranked by probability, each with a one-line reason.
3. HOW TO CHECK: for each cause, give the fastest safe way to confirm or rule it out (exact clicks, commands, or URLs).
4. THE FIX: once the cause is clear, give the smallest safe fix as numbered steps. Warn me before anything destructive.
5. VERIFY: how do I confirm it is actually fixed in under a minute?
6. PREVENT: one habit or tool that would stop this from coming back.
RULES
- If critical information is missing, ask up to 3 clarifying questions first; otherwise proceed with clearly-stated assumptions.
- Never invent file paths or commands for tools I did not mention.
- If the fix has any risk (data loss, downtime), say so in one line before the steps.
OUTPUT FORMAT
- Six numbered sections as headings, in order. ≤450 words total; ≤3 causes; each check ≤3 steps; fix ≤6 steps. Lead with WHAT HAPPENED.
Example AI response
1. WHAT HAPPENED Your blog lost its connection to the database — the separate storage area that keeps all your posts and settings — so the site has nothing to show.
2. MOST LIKELY CAUSES (ranked for "worked yesterday, broke after edits")
- Bad edit to
wp-config.php— if you or a plugin changed that file yesterday, one wrong character breaks the database login. - Host-side database issue — on shared hosting, the database service sometimes crashes or hits a resource limit; usually self-recovers or needs a host restart.
- Exceeded hosting plan limits — a traffic or storage spike can make the host temporarily refuse database connections.
3. HOW TO CHECK
- Cause 1: In your hosting panel, open File Manager → the folder containing your site → check if
wp-config.phpwas modified in the last 24 hours (look at the "Last Modified" column). - Cause 2: In the same panel, is there a "Databases" or "MySQL" section showing the database as "up"? Some panels show a red status or an error notice.
- Cause 3: Check your email for a hosting alert ("resource limit reached"), or look at the CPU/usage graph in the panel.
4. THE FIX Most likely fix — restore the config file if it was edited:
- In File Manager, right-click
wp-config.php→ your host may offer "Restore" from a daily backup (hosting panels usually keep 1–2 days). - ⚠️ If no backup exists, don't hand-edit it — copy the file's contents and paste them to me; I'll spot the broken line. Risk: hand-editing this file wrongly can take the whole site down, not just the database connection. If the file wasn't touched: contact your host's support chat and say "my database connection is failing since today — please restart the MySQL service for my account." That's a routine request for them.
5. VERIFY Open your blog in a private/incognito window. If the homepage and one post load, you're fixed (incognito avoids cached pages fooling you).
6. PREVENT Turn on automatic backups (most shared hosts offer daily backups for free or ~1–2 USD/month) — today's fix took 10 minutes because a backup existed or the host could restore; without one it can take hours.
--- *Generated for demonstration as part of Prompt Stash. Outputs vary by model and run.*
Source and license
- Source
- Prompt Stash
- Original
- Ziadtareks/prompt-stash/examples/debugging-website-error-fix.md
- License
- MIT