---
title: LaMarie Backend Optimization — Caching & Plugin Conflicts
type: article
created: '2026-04-05'
updated: '2026-04-05'
source_docs:
- raw/2026-02-20-la-marie-beauty-connect-124087261.md
tags:
- wordpress
- woocommerce
- caching
- plugins
- performance
- security
- la-marie-beauty
layer: 2
client_source: null
industry_context: null
transferable: true
---

# LaMarie Backend Optimization — Caching & Plugin Conflicts

## Overview

Following reports of frequent 500/502 errors and degraded site speed, Asymmetric performed an extensive backend audit and remediation on the La Marie Beauty WordPress/WooCommerce site. The work resolved all critical stability issues and brought the site health score to **96/100**, while reducing server query load by more than half.

This article documents the specific technical problems identified, the solutions applied, and the resulting performance improvements. See also [[clients/la-marie-beauty/_index]] for broader client context.

---

## Problems Identified

### 1. Caching Layer Conflicts

The site had three independent caching mechanisms operating simultaneously without coordination:

- **CDN-level cache** (Cloudflare)
- **Server-level cache**
- **Plugin-level caches** (one or more WordPress plugins with their own caching logic)

These layers were overlapping and conflicting, contributing to inconsistent page delivery and error conditions.

### 2. Conflicting and Outdated Plugins

Several plugins were incompatible with the current version of WordPress. These were identified using **Query Monitor**, which surfaces per-plugin query counts and error rates. Two or three plugins were generating disproportionately high query volumes and bandwidth consumption relative to the site's size.

### 3. Security Headers Plugin Causing 500 Errors

A dedicated security headers plugin was periodically triggering HTTP 500 errors. Root cause: the plugin was generating an excessive number of database queries on each request, creating server-side overload under normal traffic conditions.

---

## Solutions Applied

### Caching Stack Cleanup

Resolved conflicts across the CDN, server, and plugin caching layers. Each layer was reviewed and configured to avoid overlap. A cache flush was performed post-remediation.

### Plugin Audit and Removal

Disabled and removed old or conflicting plugins identified via Query Monitor. Bandwidth monitoring on the server confirmed these plugins were the primary contributors to abnormally high bandwidth for a site of this scale.

### Security Headers — Must-Use Plugin Replacement

The problematic security headers plugin was disabled. In its place, a **must-use (mu-plugin)** was created to deliver the same six security headers in a lightweight, query-efficient manner. No 500 or 502 errors have been observed since this change was deployed.

### Google Tag Manager Audit

Verified GTM container configuration: confirmed correct number of tags, all tags firing properly, and no irrelevant or stale tags present.

### Robots.txt and Bot Blocking Review

Reviewed `robots.txt` to confirm no unintended blocking of crawlers. Verified Cloudflare bot blocking rules, including differentiated handling of AI bots (training crawlers vs. answer-retrieval crawlers).

---

## Results

| Metric | Before | After |
|---|---|---|
| Server queries/min | ~450 | ~200 |
| Site health score | — | 96 / 100 |
| 500/502 errors | Frequent | None observed post-fix |
| Remaining health issues | — | Minor (icon alt text) |

The remaining site health deductions are cosmetic — missing alt text on decorative icons — and do not affect functionality or SEO in any meaningful way.

---

## Tooling Used

- **Query Monitor** (WordPress plugin) — per-plugin query profiling, error visibility, real-time performance inspection. Left installed in disabled state for future diagnostic use.
- **Cloudflare** — DNS, CDN, and bot blocking configuration.
- **Server-side bandwidth monitoring** — used to identify plugin-level bandwidth anomalies.
- **Audit report** (internal Asymmetric doc, run on the 9th) — covers GTM hygiene, GA4 configuration, Google Ads conversion tracking readiness, e-commerce tracking, and Microsoft Clarity/Ahrefs/Facebook integrations.

---

## Related Issues Surfaced During This Work

- **WooCommerce "view cart" quantity update bug** — identified as broken; assigned to Asymmetric for investigation and fix. See [[clients/la-marie-beauty/_index]].
- **WooCommerce–Square sync scope** — the sync handles inventory/quantity updates but does not auto-create WooCommerce product pages for new Square products. Manual page creation is required. See [[knowledge/wordpress/woocommerce-square-sync-limitations]].

---

## Notes on Scope

La Marie Beauty is a **technical maintenance client**, not a marketing retainer. The work documented here falls within that maintenance scope. Content strategy, SEO campaigns, advertising, and blog development would require a separate marketing engagement. See [[clients/la-marie-beauty/_index]] for retainer status details.