Case study
Case study: turning WordPress into an ERP and inventory system
WordPress is usually thought of as a website builder, but its user system, custom post types, and REST API make it a solid base for business software too. I designed and built an ERP suite on top of WordPress that manages products, stock, customers, orders, and reports, and then adapted it for three industries: warehouses and distributors, franchise chains, and restaurants. This case study describes the work without naming clients.
| My role | Architect and lead developer |
|---|---|
| Editions | Warehouse/distribution, franchise, restaurant, plus a central franchise HQ |
| Stack | WordPress, PHP 8.1+, Advanced Custom Fields Pro, Composer, REST API, DataTables, Dompdf, Docker |
| Languages | English, Nepali, and Japanese, including Nepali numerals |
Why build an ERP on WordPress?
The businesses involved needed inventory, ordering, and customer management that fit how they actually work, without paying per seat for a large ERP they would only use part of. WordPress gave us user accounts and roles, a flexible data model, media handling, and a REST API on day one, so development time went into the business logic rather than the plumbing.
What the system does
- Catalog and inventory: products with variations, categories, warehouses, vendors, taxes, galleries, and CSV import.
- Sales and orders: create and manage orders with delivery addresses, taxes, and line-level discounts, plus favourite-product lists for repeat customers.
- Discount engine: pricing rules per customer, customer group, or category, with quantity breaks.
- Reports: sales by year, product, category, and customer, with revenue, volume, and tax analytics.
- PDF brochures: printable product catalogues generated with Dompdf, filtered by category or vendor and in the customer’s language.
- Customers, leads, and events: customer records and groups, lead capture, and event registrations.
- A custom admin dashboard with KPI cards and role-based menus, so staff only see the tools their role needs.
A REST API for apps and partners
Every core feature is exposed through namespaced REST endpoints (products, orders, customers, discounts, warehouses, and more) that reuse the same service layer as the admin screens. That means a mobile app, a headless storefront, or a partner system gets exactly the same business rules as the dashboard. API access is authenticated, logged, and documented on a built-in API documentation page.
Built for Nepal, ready for other markets
The suite is multilingual from the ground up. Interface text, product content, and PDF brochures support English, Nepali, and Japanese, numbers can be shown in Nepali numerals, and a DeepL integration speeds up translating content into new languages.
AI product recommendations that can’t make things up
The suite recommends products to customers: personalised, trending, and similar items. Instead of letting an AI model suggest products freely, which risks recommending items that don’t exist or are out of stock, the system works in two steps:
- It builds a candidate list from real data: the customer’s order history, favourites, products often bought together, and category affinity.
- An AI model then re-ranks only that list. It can reorder candidates, but it can’t add products that aren’t in it.
The AI provider is pluggable (OpenAI, Anthropic Claude, Groq, or OpenRouter), and the business connects its own API key from the integrations screen, alongside DeepL for translation.
Franchise HQ: one view across every location
For franchise chains, each location runs its own ERP install, and a separate HQ system tracks all of them. The HQ shares customers across franchise locations and pulls together reports from every site. Each ERP install authenticates to the HQ with its own access key, so a single location can be revoked without affecting the others.
Keeping many installs up to date
With separate installs per business and per franchise location, manual updates don’t scale. The system uses a self-hosted update checker, so new versions roll out through the normal WordPress update screen. Business logic lives in a Composer-autoloaded service layer (catalog, sales, reports, utilities), which keeps the industry editions consistent while letting each one add its own features.
What this means for your business
If you’re running your business on spreadsheets, or paying for software that doesn’t fit how you work, a custom system can be more affordable than you think, especially when it’s built on a proven platform like WordPress. I build custom WordPress systems, plugins, and integrations for businesses in Nepal and abroad.
Need a custom inventory or business system?
Tell me how your business works today, and I’ll suggest what a custom system could look like.
Chat on WhatsApp