At a Glance
| Item | Details |
|---|---|
| Client | A Delhi-based computer hardware retailer (same client as Parts 1–3) |
| Period | 22 October – 1 November 2026 |
| Starting point | Cloud primary, office standby and referee in place (Part 3); one manual nightly backup on the office server |
| Speed | Uncached product pages from 2.3–2.7 s to 1.1–1.6 s; "server busy" warnings from 11 a day to zero |
| Safety | Daily off-site backups, restored and checked order by order; urgent PHP security patch on both servers |
| Ad measurement | Found that the ad pixel reported unpaid orders as sales; fixed so only paid orders count |
| Customers | Shipping message's tracking button now opens the right courier, not one courier for all |
Where We Left Off
Part 3 moved the store to a cloud primary with the office server as a live standby, and a referee that switches over automatically. A deliberate outage test proved checkout comes back in about 1.5 minutes with no orders lost.
That solved "what if a server dies". It left three quieter risks: the store slowing down under bursts of traffic, backups that lived only next to the servers they protect, and business decisions resting on numbers nobody had checked.
Performance: Surviving Traffic Bursts
The store's "server busy" warnings fell from 11 a day to zero, and the cause turned out to be the ad platform's own crawler, not customers.
A false alarm that was a real warning
On 22 October, Cloudflare reported the cloud server as down several times in one morning. It was not down. All 40 PHP workers were busy, so Cloudflare's health check waited in the queue, timed out, and looked like a failure. With automatic failover live, a slow minute could have triggered a needless switch.
We fixed it in two parts:
- Gave the health checks their own three-worker pool, so they always get an answer even when the site is busy.
- Raised the main pool from 40 to 120 workers in steps, after confirming the server had spare CPU (75–80% idle) and memory.
Pages built from scratch were slow
The PHP slow log showed the page builder (Elementor) reading a large cache setting, around 800 KB and growing with every product, dozens of times per page. A small must-use plugin now keeps it in memory for the rest of the request. Uncached product pages went from 2.3–2.7 s to 1.1–1.6 s.
The warnings did not stop
At 120 workers the server still hit its limit 4–5 times a day, always for a minute or two. We ruled out the database first: row locks averaged 6.5 ms over a week. Then we lined up one burst against the access log:
| Time (31 Oct) | Requests per minute | Server load |
|---|---|---|
| 14:20–14:26 | 65–104 (normal) | ~2 |
| 14:27–14:30 | 193, 167, 150, 303 | 57 (all 120 workers busy) |
| 14:31 onward | Back to normal | Falling |
In those three minutes, 341 requests came from Meta's ad crawler, which checks the pages an ad links to. It opens each page like a real browser and runs its scripts. Every product page it opened fired about five background calls that can never be cached. In one day, 899 crawled pages produced:
| Background call | Calls in one day | What it does |
|---|---|---|
| Tracking event relay | 2,679 | Forwards page-view events to Meta's server API |
| Browser ID | 1,341 | Creates a tracking ID for the visitor |
| Cart refresh | 1,328 | Updates the cart count in the header |
The first row was also polluting the ad data: Meta's own robot was sending Meta thousands of fake page views a day.
The fix. We did not block the crawler, because ad review depends on it. Instead, the web server now answers those three calls with an empty response when they come from Meta's crawler, so they never reach PHP. The crawler still gets every page. Real visitors, including people in the Facebook and Instagram apps, are not affected. On the first full day, 5,942 crawler calls were answered this way, and the server did not hit its worker limit once.
Safety: Backups, Patching and a Complete Standby
The store now has a daily backup outside both servers, proven by restoring it, and both servers were patched within a day of a critical PHP flaw.
Off-site backups to Google Drive
Until now, every backup lived on one of the store's own servers. The client gave us a Google Drive with ample space, and we set up a nightly job on the cloud server. It can only see files it created, not the rest of the client's Drive.
Our first attempt copied files one by one. At about 15 files a minute, the 162,000 site files would have taken a week. We switched to compressed archives:
| Backup | When | Kept for |
|---|---|---|
| Database dump | Every night at 2:30 AM | 14 days |
| Monthly database dump | 1st of each month | About 6 months |
| Full site files, in 2 GB parts | Every Sunday | 4 weeks |
| Files changed in the last day | Other nights | 15 days |
The dump runs as a read-only database user, so a fault in the backup can never change store data. To prove the backup works, we restored the latest dump into a separate test database. It held exactly what the live store held that night: 10,203 orders, the same highest order number, and 2,120 products.
An urgent PHP patch
When a critical PHP flaw (known as PHP2Shell) was published in late October, we upgraded both servers to the fixed PHP release within a day. We also turned off an unused PHP upload feature as an extra layer. The office server kept its previous PHP folder as a fallback.
A standby that has everything
Part 3 copied only new images to the standby. Now the whole site, including plugin and theme updates, copies across every 15 minutes, and only while the office server is the standby. The first dry run showed it would delete 84,000 image copies that the office server generates for itself, so we excluded those, along with configuration and cache files. Testing the sync in dry-run mode first is what caught it.
Measuring Ads Honestly: The 95× Return That Wasn't
The ad platform credited its first campaign with 101 purchases and a 95× return on spend, but none of the 63 orders that came from ad clicks was ever paid. The pixel was reporting placed orders as sales; it now reports only paid ones.
The question
The client asked for a list of every order from Meta ads between 29 September and 26 October, to set against the agency's monthly report. The store's own order records told a different story:
| Source of the order | Orders placed | Orders paid |
|---|---|---|
| Meta ads (link click) | 63 | 0 (57 cancelled, 6 failed) |
| Google Ads | 661 | 96 |
| Google search, direct and other | 552 | 109 |
Many placed orders go unpaid in every channel: customers reach the payment page and stop. But zero out of 63 is not a channel that converts poorly. Something was counting the wrong event. The reported purchase value was within 3% of the total value of those 63 unpaid orders.
What we checked before saying anything
A claim like this has to survive pushback, so we tested it five ways:
- Did ad visitors buy later through another route? The pixel stores a Meta click cookie on every order. It was on 62 of the 63 Meta orders, so the check works. Of 205 paid orders that month, only 3 carried it.
- Same person, later order? Matching phone and email, 7 of the 50 Meta customers placed a paid order later, through any channel.
- Did the advertised products sell more? Paid sales of the products people ordered from ads rose by about a fifth of the claimed value, while total paid sales fell 11% a day against the month before. That is the most an indirect effect could be, since the same products also ran on Google Ads.
- What did Meta actually receive? Its Events Manager showed 982 Purchase events from 3 to 30 October, against about 205 paid orders.
- Click or view? Comparing attribution settings, 62 of October's 116 credited purchases came only from someone seeing an ad, not clicking it.
Our estimate of the campaign's real effect was roughly a tenth of the reported figure: about a 3–10× return rather than 95×. That is still a healthy result, which mattered to how the agency heard it.
The cause
The store sends conversions to Meta through a tracking plugin (PixelYourSite, free edition). It fires a Purchase when the customer lands on the order-received page. The UPI, card and EMI gateways send customers back to that page even when payment did not complete, while the order is still pending. The store cancels it later, but Meta has already counted a sale.
The fix
The plugin's setting to fire Purchase only for chosen order statuses is a paid feature, so its settings screen greys it out. Its code, however, still reads that setting. A ten-line must-use plugin now sets it on every request: Purchase fires only for Processing and Completed orders. The next day, an order from an ad click that was cancelled (₹14,495) was not counted, and a paid order was.
One wrong turn, owned
We first blamed the official Facebook for WooCommerce plugin, whose code also counts pending orders as purchases. Order records showed its pixel had been switched off all along. We left a guard in place for it, harmlessly, but the real fix was elsewhere. The lesson: confirm a code path is actually running before calling it the cause.
Reading the reports from now on
Ad platforms credit themselves with any purchase within a day of someone seeing an ad. On 31 October, the one purchase Meta credited was a customer who searched Google for a motherboard the campaign did not advertise. Both Google and Meta claim that order. We recommended judging the campaign on 7-day click purchases, and treating view-only purchases as assisted at most.
Customer Messages: A Tracking Button for Every Courier
The WhatsApp "order shipped" message now opens the right courier's tracking page for every shipment, not just one courier's.
The message's Track Order button had one courier's address built in, with the tracking number added at the end. That was fine when every parcel went through one courier. Over 60 days, 20% of shipments had gone through seven others, so one customer in five got a page that showed nothing.
- The button now points to a small page on the store's own site, with the tracking number.
- That page looks up the shipment, finds its courier, and sends the customer straight to that courier's tracking page.
- For couriers with no reliable direct link, it shows the courier's name, the tracking number with a copy button, and a link to the courier's site.
- It shows no customer details and is never cached.
We tested real tracking numbers for the main couriers before changing the button in WhatsApp, so no customer ever saw a broken page.
Two smaller changes went in at the client's request: the shipped message now goes out when an order is marked Completed rather than the moment a tracking number is entered, and it reminds customers to film an uncut unboxing video, without which no replacement is accepted.
Problems We Hit and How We Solved Them
| Problem | Cause | Fix |
|---|---|---|
| Cloudflare reported the primary down when it was not | Health checks queued behind 40 busy PHP workers and timed out | Separate three-worker pool for health checks; main pool raised to 120 |
| Product pages took 2.3–2.7 s to build | Page builder re-read a ~800 KB cache setting dozens of times per page | Must-use plugin keeps it in memory per request; 1.1–1.6 s |
| Short bursts still exhausted 120 workers | Meta's ad crawler ran page scripts, firing ~5 uncacheable background calls per page | Web server answers those calls with an empty response for the crawler only |
| Off-site backup would have taken a week | Copying 162,000 files one by one to Drive | Weekly full and daily changed-file archives, plus a nightly database dump |
| First full-site sync would delete 84,000 images on the standby | Standby generates its own image copies that the cloud server does not have | Excluded them; caught in a dry run |
| Ad platform reported unpaid orders as sales | Tracking plugin fired Purchase on the order page, before payment was confirmed | Purchase now fires only for paid orders |
| Tracking button opened the wrong courier for 1 in 5 shipments | One courier's address was built into the message template | Button goes through a small page that redirects to the shipment's own courier |
Two checks prevented most of the damage here: running every risky change as a dry run first, and validating each method before trusting its answer, as with the click cookie found on 62 of 63 Meta orders.
Results
The store now stays fast through traffic bursts, can be rebuilt from a backup kept outside its own servers, and reports ad results the client can trust.
| Measure | Before | After |
|---|---|---|
| "Server busy" warnings | 11 a day (27 Oct) | 0 (1 Nov) |
| Uncached product page | 2.3–2.7 s | 1.1–1.6 s |
| Health check during busy minutes | Timed out, looked like an outage | Own workers, always answers |
| Backups | One server, next to the store | Nightly to Google Drive, restore tested order by order |
| Critical PHP flaw | Exposed on both servers | Patched within a day |
| Standby site files | New images only | Whole site every 15 minutes |
| Purchases sent to Meta | Every placed order (982 events vs ~205 paid orders, 3–30 Oct) | Paid orders only |
| Campaign return as reported | 95× | Realistic estimate 3–10×, judged on clicks |
| Shipments with a working tracking button | About 80% | All couriers |
What's Next
The remaining work closes the last security gaps from the migration and makes recovery less dependent on any one person.
- Rotate every password and access token used during the migration, with the referee paused so the change cannot trigger a false failover.
- Write a step-by-step failback guide for returning to the cloud server after a real failover.
- Phone alerts when a failover happens or a nightly backup fails.
- Keep the standby's page cache warm, carried over from Part 3.
- Add main images to 153 products that have none, which also improves their ad catalog entries.
Takeaways for any store owner: check an ad platform's purchases against paid orders in your own store before acting on them; ask whether a credited purchase came from a click or only a view; and when a server is busy, find out who is keeping it busy before buying more capacity.
NIMU Technologies' Role
- Traced the "server busy" warnings to Meta's ad crawler and stopped them without blocking it
- Cut uncached product page time roughly in half
- Set up off-site backups and proved them with an order-by-order restore
- Patched both servers within a day of a critical PHP flaw
- Tested the ad result five ways, then fixed tracking so only paid orders count
- Owned a wrong first diagnosis openly
Are Your Store's Numbers Telling the Truth?
If your WooCommerce store slows down at random, keeps its backups next to the server, or reports more ad sales than you see paid, NIMU Technologies can find out why and fix it. Explore our performance optimisation, cloud backup and disaster recovery, security updates and server monitoring services.
Talk to Us About Your Store Explore Performance Optimisation