Double-entry accounting that runs on your own PHP and MySQL hosting

PHP Ledger connects invoices, bills, payments and optional stock workflows to balanced journals, then shows the profit and loss, balance sheet and cash position behind them. It is open source, with new project-owned code under AGPL-3.0-or-later, and version 0.4.0-preview is ready to download.

Earlier 0.1.0-preview captures; every screen on this page shows synthetic sample data.

The owner overview connects synthetic balances with the reports behind them.

A tea seller pouring chai through a sieve at a market stall, steam rising from the pot.
A tea stall at a market. Photograph by Gowtham AGM.

A cash sale at the counter becomes a receipt and a balanced journal

A cash sale creates a printable receipt and a journal through the central posting service.

What happens when a sale is posted?

Choose from the catalog, take the cash and print the receipt. The balanced entry records: 5.75 to cash, 5.75 to sales. Stock movement, tax and card payments are not included.

Compare the basket total with cash received and change before posting. In the synthetic screen, 10.00 received against a 5.75 sale leaves 4.25 change. This cash counter is useful for evaluating the posting path; it does not provide a tax invoice or a customer credit account.

See the point of sale
A fictional cash-sale basket shows a 5.75 total, 10.00 cash received and 4.25 change.
A craftsman working at a low table inside a small shop with blue doors.
A shop in Kolkata, India. Photograph by Gorky Sinha.

Each expense keeps its payee, date, category and journal together

A draft stays outside the posted books until you review and post it.

Posting creates one balanced entry: 125.00 to general expenses, 125.00 from cash and bank. The source remains connected to its journal.

Why does a correction create a reversal?

A linked reversing entry preserves the original posted history and explains the change.

The correction foundation keeps the same document identity across reversal and reposting. Review the reason, reversal date and period controls instead of treating a posted amount as an editable cell. The correction lesson explains the accounting distinction.

How the books work
The posted sample keeps its debit and credit evidence together.
A brightly lit shop at night with customers at the counter and motorbikes parked outside.
Faisalabad at night. Photograph by Aa Dil.

At the end of the day the owner sees 875.00 in the bank and knows why

The reports read the same posted entries and connect their totals to the journal and source record.

How does the sample reach 875.00?

With no opening balance or other activity, 1,000.00 of cash income less 125.00 of cash expenses leaves 875.00.

Profit equals cash in this small example because both transactions are cash movements. A loan or unpaid sale would change that relationship. Check the company, dates and account classification before comparing reports; the reporting lesson works through the difference.

See the reports
Account movements explain the sample balance and retain source links.

Reports and a cash scenario in one place

Posted figures only. The cash scenario uses the weekly assumptions you enter; it is not a prediction.

Three ways to get started

Start with fictional records in the browser, then test the package and recovery process on your own hosting.

Who should start with the demo?

A private sample company with synthetic records. It resets every hour, so keep real books out of it.

Try the demo

How do you test your own hosting?

PHP 8.2+, MySQL 8.4 and HTTPS. The ZIP ships with its SHA-256 checksum and an installation guide.

Download 0.4.0-preview

When should you ask for setup help?

Installation assistance, training and troubleshooting on your own hosting, scoped in writing before work starts.

Ask about support

What is in the preview, and what comes next

The preview connects customer and supplier documents, payments, optional stock workflows and reports through shared accounting services.

Further capabilities follow the roadmap and need accounting and usability review. Contributions, worked accounting examples and installation reports are welcome on GitHub.

Version
0.4.0-preview, released 16 September 2026
Licence
AGPL-3.0-or-later for new project-owned code; commercial licence available.
Requirements
PHP 8.2+ (8.3 recommended), MySQL 8.4 (InnoDB), HTTPS, terminal access
Demo
Five synthetic choices: one starter playground and four multi-year teaching histories; hourly reset.
Source
Public Git repository
See the roadmap

Which capabilities can you evaluate now?

Follow an invoice or bill through partial payment, credit and reconciliation, then enable optional stock workflows when needed.

  • Company setup and account management with audit history
  • Receipt, expense and general-journal drafts, posting, linked reversals
  • Account statements, trial balance, profit and loss, balance sheet
  • Cash scenario from your own assumptions
  • Cash point of sale with a printable receipt
  • Ten supported functional currencies; one immutable functional currency per company/book
  • Shared customer/vendor parties, invoices, bills, partial payments, credits and historical ageing
  • Optional purchase orders, goods receipts, bill matching and received-but-unbilled reconciliation
  • Optional one-location Inventory with moving weighted-average cost and stock-to-ledger reconciliation
  • Manual tax codes and rates with inclusive or exclusive price entry

What remains unfinished?

Later extensions and independent review remain separate from this bounded starter.

  • Advances, unapplied credits, overpayments and cash refunds
  • Multiple stock locations, batches, serials, expiry and landed cost
  • Country tax rules, withholding, statutory forms and e-filing
  • Detailed historical imports and reviewed reporting
  • Automated rate feeds, period-end revaluation and consolidation
  • Card payments, offline use and document scanning
Current preview and future scope
AreaIn 0.4.0-previewFuture work
BookkeepingDrafts, posting, reversals and reportsReviewed statement packages
AR/APInvoices, bills, partial payments, credits and ageingAdvances, unapplied credits and cash refunds
Stock and purchasingOptional inventory, receipts, matched bills and returnsAdvanced stock and integration with the cash POS

Frequently asked questions

These answers describe the current release and the choices you need to make before evaluating it.

Is PHP Ledger really free?

The project-owned core is free under AGPL-3.0-or-later. Hosting, setup, optional support and a separate commercial licence have their own terms. The 0.1.0 through 0.1.5 previews retain their earlier MIT grants.

What do I need to run it?

Use PHP 8.2 or newer for both web and command-line requests, MySQL 8.4, HTTPS and terminal access. The package includes dependencies and an installation guide. PHP 8.3 is recommended.

Does it work on shared cPanel hosting?

A panel alone does not prove compatibility. Your plan must provide the required PHP extensions, MySQL 8.4, terminal access, private files and the correct public document root. Run package preflight on the actual account.

Does PHP Ledger send my data anywhere?

There are no licence-key or licensing-server calls. The static website has no analytics or form submission endpoint. The separate application has a documented optional country lookup; connections are explicit and scoped. Read the privacy page for the distinct website, demo and installed-application boundaries.

Can it invoice customers or settle bills yet?

Yes. The starter includes customer invoices, supplier bills, partial and final allocated payments, linked credits, ageing and control reconciliation. AR/AP belong to the core; owners can hide unused navigation. The separate cash POS remains a cash-sale showcase.

Is it ready for real books?

It remains a development preview. Technical tests and balanced reports are evidence for evaluation, but qualified accounting review, observed business use and supported statement packages remain open gates. Use synthetic records until you complete a reviewed acceptance process.

What if the project stops?

You retain the source and your self-hosted database under the applicable licence. Continued maintenance, recovery and data extraction still need an operator. Keep tested backups and portable report exports rather than relying on the existence of a ZIP alone.

Product screen

Development preview with synthetic sample data

Scroll the image to explore it. With a keyboard, focus the image area and use the arrow keys.