Tag: website troubleshooting

  • Case study 19: When Code Breaks a Client’s Website: How Programmers Should Communicate During a Production Incident

    The code failed. The communication shouldn’t.

    Every programmer eventually makes a mistake.

    Sometimes it is a small bug that affects one button. Sometimes it is a database query that returns the wrong result. And sometimes, especially when working directly on a live website, a mistake can make an entire website appear broken.

    For a programmer, the technical problem may be understandable: a misplaced function, a bad configuration, an unexpected server response, or a plugin conflict.

    For the client, however, the situation is very different.

    They may see a blank website.

    They may be unable to access WordPress administration.

    They may worry that their data is gone.

    They may wonder whether their business is losing customers.

    And they may immediately ask:

    “What happened?”

    At that moment, technical ability is only half of the job.

    The other half is communication.

    A lesson from a real freelance project

    Early in my freelance work, I experienced a situation that taught me an important lesson about communicating during technical incidents.

    A client hired me to develop a WordPress plugin that would generate an XML feed from their website and synchronize advertisements with another property platform.

    The project was relatively small. The agreed price was $30, with a three-day delivery period and source code included.

    While developing the plugin, I made a mistake in the code. An exit() statement had been placed incorrectly.

    The result was serious: the client’s live WordPress website became inaccessible.

    The client reported that the website was blank and that even the WordPress administration area was not working correctly.

    Naturally, the client’s reaction was emotional.

    From the developer’s perspective, the underlying problem was identifiable and potentially recoverable. From the client’s perspective, however, their website was down.

    That distinction is extremely important.

    Technical reality and client reality are different

    A programmer might think:

    “The plugin is causing the problem. We simply need to disable it.”

    The client might think:

    “My website has disappeared. Is my data safe? Is my business website destroyed? Who is going to pay for this?”

    Both perspectives are understandable.

    The programmer sees the cause.

    The client sees the impact.

    Good communication connects those two perspectives.

    One of the messages I sent at the time was essentially:

    “Your website is ok, we need to remove the plugin.”

    Technically, I was trying to reassure the client.

    But looking back, that was not the best wording.

    If the client is looking at a blank website, telling them that the website is “OK” can sound as though the developer is denying the problem.

    A better approach would have been:

    “I understand that the website is currently blank. I have identified the plugin as the cause. The website files and content should still be intact, and the immediate step is to disable the plugin so we can restore normal access.”

    That message does several things:

    • acknowledges the visible problem;
    • takes responsibility;
    • explains what has been identified;
    • reduces unnecessary panic;
    • provides a recovery direction.

    That is much more effective communication.

    The Five-Step Incident Communication Framework

    When your code causes a problem on a client’s live system, use this simple framework:

    Acknowledge → Own → Explain → Recover → Prevent

    Let’s examine each step.

    1. Acknowledge the problem

    Start with what the client is experiencing.

    Don’t immediately start talking about PHP functions, WordPress hooks, database queries, server configuration, or XML.

    Say:

    “I understand that the website is currently showing a blank page.”

    This confirms that you understand the problem.

    It also prevents the client from feeling ignored.

    During an incident, the first communication should answer:

    “Do you understand what is happening?”

    Only after that should you move into technical details.


    2. Own the mistake

    If your code caused the problem, say so clearly.

    Avoid language such as:

    • “Something happened.”
    • “The server is acting strange.”
    • “Maybe HostGator caused it.”
    • “WordPress is having an issue.”
    • “It could be a plugin conflict.”

    If you already know your code is responsible, don’t hide behind uncertainty.

    A professional message is:

    “I found an issue in the plugin code that is causing the website to stop loading. This is my mistake, and I will focus first on restoring the website.”

    Taking responsibility does not make you look weak.

    In fact, it often establishes trust.

    Clients generally understand that programmers can make mistakes. What damages confidence is when the programmer appears to avoid responsibility.


    3. Explain the technical cause — but in the right amount

    Once the immediate situation is acknowledged, explain the cause.

    In this case, the issue involved an incorrectly placed exit() function inside a new WordPress plugin.

    A technical explanation could be:

    “The plugin contains an exit() call in the wrong execution path. Because the plugin is loaded by WordPress, the statement interrupts normal page execution and results in the blank page.”

    That is useful.

    But the explanation should not become a lecture.

    The client usually doesn’t need to understand PHP execution flow while their website is unavailable.

    Think about the difference between these two messages:

    Too technical:

    “The exit() function is terminating execution before WordPress completes the template lifecycle, probably because the hook is being executed globally.”

    Better:

    “I found an error in the new plugin that stops WordPress from completing the page request. I know where the problem is and am working on disabling the affected component first.”

    The second message communicates the same essential information without overwhelming the client.


    4. Give a recovery plan

    This is perhaps the most important part.

    When a website is down, don’t send ten possible solutions.

    Give the client a clear sequence.

    For example:

    Step 1: Disable the affected plugin.

    Step 2: Confirm that the website loads again.

    Step 3: Inspect and correct the plugin code.

    Step 4: Test the corrected plugin on a safe environment.

    Step 5: Only then reinstall or reactivate it on the live website.

    This is much better than sending a series of disconnected instructions.

    During a production incident, the client wants to know:

    “What happens next?”

    Answer that question explicitly.


    5. Explain how you will prevent a repeat

    After the website is restored, don’t simply say:

    “Fixed.”

    Explain what changed.

    For example:

    “The plugin has been corrected and tested separately. I have also removed the execution path that caused the page to stop loading. Before reactivating it on the live website, I will test the feed generation and WordPress admin functionality.”

    This demonstrates that you are not merely patching the symptom.

    You are addressing the underlying problem.

    Don’t make the client troubleshoot your code

    One of the lessons I learned from this experience is that developers should be careful about transferring technical responsibility to the client during an incident.

    Asking a client to:

    “Remove this folder from wp-content/plugins/”

    may be technically valid.

    But if the client isn’t a developer, they may not be comfortable working inside the hosting filesystem.

    A better approach is to explain why the action is needed:

    “The problem is isolated to the new domaza_xml_feed plugin. Temporarily disabling that plugin should allow WordPress to load normally. If you can provide temporary FTP or hosting access, I can perform the change myself.”

    This is much more reassuring.

    The client understands:

    • what is being changed;
    • why it is being changed;
    • what the expected result is;
    • and who is responsible for the fix.

    Avoid promises like “I’ll fix it in no time”

    When a website is down, developers sometimes try to reassure clients with statements such as:

    “I will fix it in no time.”

    The intention is good.

    The problem is that it creates an unnecessary promise.

    What if the hosting environment introduces another issue?

    What if the backup is unavailable?

    What if the problem is more complicated than initially expected?

    Instead, communicate the next concrete action:

    “My first priority is to restore the website. I will disable the affected plugin and then investigate the code separately.”

    That is confident without making an unrealistic guarantee.

    Never send ten messages when one clear message will do

    Another common mistake during stressful situations is sending message after message.

    For example:

    “Please share hosting access.”

    Then:

    “FTP access would be better.”

    Then:

    “Please ask your hosting provider.”

    Then:

    “Please disable the plugin.”

    Then:

    “Give me one chance.”

    The developer may be trying to help, but to the client it can look like uncertainty.

    A better communication pattern is:

    What happened → What I found → What I will do → What I need from you.

    For example:

    “I identified the new plugin as the cause of the blank page. The issue is related to an execution statement in the plugin code. I need to disable the plugin first to restore the website. If you can provide temporary FTP access, I can do this directly; otherwise, your hosting provider can disable the plugin using the plugin folder name domaza_xml_feed.”

    One message.

    Clear.

    Actionable.

    Professional.

    What about an angry client?

    Clients may write in capital letters.

    They may ask:

    “WHAT DID YOU DO?”

    They may ask:

    “WHO WILL PAY ME?”

    They may blame the developer.

    Your response should not mirror their emotional tone.

    Don’t argue.

    Don’t write:

    “Calm down.”

    Don’t say:

    “It’s not a big problem.”

    Don’t immediately defend yourself.

    Instead:

    “I understand why you’re concerned. The website is currently affected by the plugin I was developing, and I take responsibility for correcting the issue. My immediate priority is to restore the website.”

    This changes the conversation from blame to resolution.

    The importance of testing before touching production

    There is also a technical lesson behind the communication lesson.

    If you are developing a WordPress plugin that can affect the entire website, avoid treating the client’s live website as your development environment whenever possible.

    A safer workflow is:

    Development → Staging → Testing → Backup → Production

    Before activating a new plugin on production:

    • take a backup;
    • test the plugin on staging;
    • verify WordPress admin access;
    • test the homepage;
    • test important custom post types;
    • test database operations;
    • test feed generation;
    • check PHP errors;
    • verify that disabling the plugin restores normal operation.

    For small freelance projects, you may not always have a complete staging environment.

    But you can still create a safer process.

    Even a local WordPress installation or temporary test environment is better than experimenting directly on a client’s live business website.

    Communication is part of programming

    A common misconception among new programmers is that their job is simply to write working code.

    It isn’t.

    Professional software development also involves:

    • understanding requirements;
    • setting expectations;
    • documenting changes;
    • communicating risks;
    • reporting progress;
    • handling failures;
    • explaining technical decisions;
    • and taking responsibility when something goes wrong.

    A developer who writes excellent code but communicates poorly can still create a poor client experience.

    Likewise, a developer who makes an occasional mistake but communicates clearly, takes responsibility, and fixes the problem professionally can maintain a strong working relationship.

    The goal isn’t to become a programmer who never makes mistakes.

    The goal is to become a programmer who knows how to respond when mistakes happen.

    A practical emergency message template

    New programmers and freelancers can keep a template like this available:

    Hi [Client Name],

    I understand that the website is currently affected, and I have identified the issue as coming from the code I recently added.

    I take responsibility for the problem. My first priority is to restore the website, so I recommend temporarily disabling the affected component.

    Once the website is back online, I will investigate and correct the code separately and test the fix before activating it again.

    If you can provide temporary [FTP/hosting/staging] access, I can handle the recovery directly.

    I will keep you updated on the progress and explain the final cause and fix once the issue is resolved.

    Regards,
    [Your Name]

    The template can be adapted depending on the situation.

    The important part is the structure, not the exact wording.

    Five rules every new programmer should remember

    When your code causes a production problem:

    1. Don’t hide the mistake.
    If your code caused it, acknowledge it.

    2. Don’t overwhelm the client with technical details.
    Explain the cause at the level necessary to understand the situation.

    3. Don’t argue about whether the problem is “serious.”
    Focus on restoring the service.

    4. Don’t give multiple conflicting instructions.
    Give one clear recovery plan.

    5. Don’t stop communicating after the fix.
    Explain what happened, what you changed, and how you will reduce the chance of recurrence.

    The bigger lesson

    That 2023 WordPress project was not an example of perfect development.

    It was an example of something more useful: learning from a real production mistake.

    The technical mistake was relatively simple.

    The larger lesson was about professional responsibility.

    When a developer’s code affects a client’s website, the client doesn’t need a perfect programmer.

    They need a programmer who is:

    honest, calm, clear, accountable, and focused on recovery.

    Years of programming experience teach you that bugs are unavoidable.

    Professionalism is demonstrated by what you do next.

    The best developers don’t communicate only when everything works.

    They communicate especially well when something doesn’t work.

    And sometimes, the most valuable lesson from a broken website isn’t found in the code.

    It is found in the conversation that follows.