How-to guide: Fixing “connection lost” error in WordPress classic editor

At Freshy, we frequently troubleshoot and resolve persistent backend errors in WordPress. In this case, we addressed a frustrating “Connection Lost” error message that appeared while editing posts and orders in the WordPress Classic Editor.

Issue Background

While editing WooCommerce orders and other post types using the Classic Editor interface, users were frequently encountering a “Connection Lost” error message. This issue was intermittent but confusing for editors and store administrators.

Diagnosis

Our investigation revealed several contributing factors:

  1. Not Limited to WooCommerce Orders: The error was initially believed to be related only to WooCommerce orders. However, we confirmed that it appeared across any post type using the Classic Editor experience.
  2. No Actual Data Loss: Despite the alarming message, post saves and order edits were successfully processed. The issue was primarily a display problem, not a data-saving issue.
  3. Plugin Compatibility Suspected: During early testing, we identified that disabling specific plugins seemed to resolve the issue, indicating a potential plugin conflict.
  4. Hidden CSS Notice Behavior: Further in-depth inspection revealed a small, hidden CSS snippet in the site’s functions.php file. This snippet was forcing all editor notices to be permanently visible, including the outdated Connection Lost message.

Resolution Steps

  1. Plugin Updates: We updated all plugins in the staging environment. The issue was no longer reproducible after the updates, suggesting that one of the previously installed plugin versions caused the conflict.
  2. Functions.php Review: We discovered a hidden CSS rule in functions.php forcing all admin notices (including “Connection Lost”) to remain visible. We commented out the problematic snippet to prevent unnecessary notice display.
  3. Testing & Validation: We thoroughly tested the site in both staging and live environments. Verified that the error message no longer appeared while editing posts or WooCommerce orders.
  4. Client Confirmation: We communicated the cause and fix to the client. Provided reassurance that no data loss occurred during the error displays.

Final Outcome

The misleading “Connection Lost” error was fully resolved. It was caused by a combination of:

  • Outdated plugin versions.
  • A small, unintended CSS snippet in the functions.php file that forced notices to stay visible.
  • No underlying connection issue or data loss.

The backend editing experience is now clean and error-free.

Key Technical Takeaways

  • Classic Editor Quirks: Legacy post editor interfaces can trigger outdated notice behaviors, especially when combined with custom code.
  • Custom Code Review: Always audit functions.php and custom snippets when troubleshooting backend display issues.
  • Plugin Compatibility: Keeping plugins updated can prevent subtle conflicts like this one.
  • Error Message Context: Error banners in WordPress may sometimes be cosmetic and not indicative of actual problems—always test functionality.

Experiencing strange error messages or backend glitches in WordPress?
Freshy can help audit and clean up your WordPress site’s code and configuration to ensure smooth performance.
Contact Freshy for WordPress troubleshooting