Skip to main content
Return to Work System.Return('/work')
E-commerce WooCommerce WordPress PHP DigitalOcean Nginx Redis

Mushtariyat.com: High-Performance E-Commerce on DigitalOcean

Bespoke WooCommerce platform on a $20 DigitalOcean droplet serving 5,000+ monthly visitors, with Redis object caching, Cloudflare edge caching, and Thawani Pay for the Omani market.

$ outcome

Established a primary sales channel for Maryana Group during the COVID-19 retail shutdown.

Mushtariyat.com: High-Performance E-Commerce on DigitalOcean
Date 2020
Status Live & Operational
Lead Lead Developer & Systems Engineer
5,000+ Monthly visitors
99.9% Uptime across major sale events
65% Page-load time reduction vs pre-optimization baseline

$ cat stack.json

  • PHP 8.1
  • WordPress + WooCommerce
  • MariaDB
  • Nginx
  • Redis
  • Cloudflare CDN + WAF
  • Thawani Pay API
  • Ubuntu 20.04 LTS
  • DigitalOcean Droplet

$ timeline

2020-01 2023-12

$ session.log

$ ssh deploy@web01.example.internal "sudo nginx -t && sudo systemctl reload nginx"
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

$ redis-cli -s /var/run/redis/redis.sock info stats | grep -E 'keyspace_(hits|misses)'
keyspace_hits:48213
keyspace_misses:3117

$ wp --path=/var/www/mushtariyat cache flush --quiet && echo OK
OK

Overview

Mushtariyat Homepage

When COVID-19 closed physical retail in early 2020, Maryana Group had a problem: a business built entirely on foot traffic with nowhere for feet to go. I built Mushtariyat.com, a custom WooCommerce platform on DigitalOcean infrastructure. Full-stack development, server administration, UX design. Mine, end to end.

The site scaled to process thousands of orders during the lockdowns. Today it serves 5,000+ monthly visitors with a mobile-first experience built for the Oman and UAE beauty market. It holds 99.9% uptime across major sale events and loads 65% faster than before the 2023 optimization pass.


1. The Problem

Launched in Q2 2020. This was never a website project. It was a revenue channel built during a global crisis, on a deadline nobody chose.

Maryana Group carries an extensive catalog of premium cosmetics, skincare, and fragrance brands. The brief was an online store that reflected the quality of those products without letting infrastructure costs eat the margin. Three constraints shaped every decision:

  • Time to market: the platform had to be operational within weeks to capture lockdown-driven online shopping.
  • Inventory complexity: thousands of variable SKUs (shades, sizes, bundles) needed a solid database structure.
  • Budget limits: a $2,000/month Shopify Plus seat was ruled out. A self-hosted open-source stack on a $20/month VPS was the right fit, roughly 1% of the SaaS cost.

The 2020 build was the start, not the whole story. The dateRange above runs to 2023 because the store kept earning work: the 2023 optimization pass (server-side WebP daemon plus Cloudflare CDN offload, §3) cut page load time 65%, and the traffic, 99.9% sale-event uptime, and cost figures in §5 are measured across that full 2020–2023 life. Not the launch quarter.


2. Architecture

I skipped shared hosting and built a custom Linux stack on a DigitalOcean Droplet.

Mushtariyat E-Commerce Stack Architecture
Mushtariyat E-Commerce Stack Architecture.

Stack: Customer → Cloudflare CDN/WAF → DigitalOcean Droplet (Nginx/PHP-FPM) → Redis Cache + MariaDB.

2. Architecture
LayerChoiceWhy
EdgeCloudflare CDN + WAFStatic-asset offload to Gulf edge nodes; blocks SQL injection and scraper bots
WebNginx on Ubuntu 20.04 LTSReverse proxy, permalink handling, static-asset caching
RuntimePHP 8.1 + OPcacheMeasurable speed gain over the older PHP the catalog was prototyped on
DataMariaDB, tuned for readsE-commerce catalogs are read-heavy; indexes shaped for category queries
CacheRedis object cacheAbsorbs repeat catalog reads so category pages skip the database

3. Implementation

The storefront is a bespoke WordPress theme written from scratch in PHP, HTML5, SCSS, and vanilla JavaScript: no bloated commercial theme. Analytics projected 75–80% of visitors on mobile, so the design went touch-first. A thumb-friendly bottom nav bar mimicking native apps, a multi-step accordion checkout to cut abandonment, and AJAX sidebar filters (brand, skin type, shade, price) over thousands of products without page reloads.

On a phone viewport it looks like this: single-column product grid, thumb-reachable filters, no horizontal scroll.

Mobile product-grid view of the Mushtariyat storefront on an iPhone

Two hard problems, and what fixed them:

Speed vs. high-res media. Cosmetics needs high-resolution shade photography, but WooCommerce galleries of unoptimized 2MB+ photos stall. I added a server-side daemon converting uploads to WebP and pushed static assets to the Cloudflare CDN. Page load time fell 65% (measured at the 2023 optimization pass), with First Contentful Paint improving into passing Core Web Vitals territory.

Local payments. Stripe’s plugin story was poor for Omani debit networks, so I integrated Thawani Pay via its REST API. Custom PHP callback handlers parse and verify Thawani’s encrypted webhook responses, marking carts Processing the moment the local bank deduction succeeds.

The deploy-and-verify loop is the session log above: nginx -t plus a reload, a Redis hit-rate check (roughly 94% hits on catalog reads), and a cache flush that returns OK.

Storefront demo (screen recording)

A short screen recording of the storefront in action: AJAX sidebar filtering and product interaction without page reloads.


4. Operations

Security folded into operations from day one, because a store handling customer data and card webhooks has no “later”:

  • Edge: Cloudflare WAF in front of everything; UFW allowing only ports 80/443; SSH key-only auth with Fail2Ban against brute force.
  • Encryption: HTTPS via automated Let’s Encrypt certificates; nightly cron backups encrypted and shipped off-site to S3 (database + media library).
  • Monitoring: uptime probes hit the checkout flow, because a store that serves 200s on / but 500s on /checkout is down and lying about it. The 99.9% figure below is per owner-reported monitoring across those sale windows.
  • Cost: the full stack ($20/month DigitalOcean droplet, Cloudflare free tier, Let’s Encrypt, S3 backup pennies) runs for roughly two orders of magnitude less than the $2,000/month Shopify Plus quote it replaced (see §3: the quote was ruled out on budget).

5. Results

  • Traffic: organically scaled to 5,000+ monthly visitors, the group’s primary sales channel through and after lockdown.
  • Reliability: 99.9% uptime maintained across White Friday and Eid Al-Fitr sale windows (per owner-reported uptime monitoring — see §4).
  • Speed: 65% lower page load time after the WebP + CDN optimization pass (measured at the 2023 optimization pass — see §3).

Figures as of Oct 2026.

The $20 bet, six years on

The droplet handled every White Friday and Eid surge the group threw at it, and I’d take the same bet again tomorrow: Redis object caching plus Cloudflare edge caching on a $20 VPS, because the bottleneck was always image weight and repeat catalog reads. Never the server. The part that still bothers me is the Thawani integration. Those custom PHP callback handlers parse encrypted webhook responses from Omani debit networks, and I wrote them against a live payment rail with no staging twin to break things on first. It worked. Every sale window since has worked. But “it worked” is not the same as “it was safe to build that way,” and the staging droplet I never spun up would have cost $6 a month.


What I’d Do Differently

One design regret: the bespoke theme. Hand-rolled PHP templates bought full control in 2020 but every WooCommerce major version since has been a manual merge. A block-theme child with template overrides would have tracked upstream with less toil.

One scope regret: I never built a staging droplet. Every optimization pass, including the 65% page-weight win, was verified against production with a maintenance window. A $6 staging twin would have been cheap insurance.

“A $20 VPS with Redis and a CDN out-served the $2,000 SaaS quote. The bottleneck was never the server.”

Share this case: Share on X Share on LinkedIn Share on Reddit

Migrating something similar?

I led this deployment end to end — scope, cutover, and guardrails. Tell me what you are running and I will reply with a migration sketch.

↑↓ navigate Tab complete Enter open Esc close View all →