WPLedger Accounting
A WordPress plugin implementing a double-entry accounting system: companies, chart of accounts, journal entries, three financial statements (Balance Sheet, Income Statement, Cash Flow Statement), PDF export, and a REST API that accepts data from external invoicing and project-management tools.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/ibuilder/wpledger/archive/refs/heads/main.zipReadme
WPLedger Accounting
A WordPress plugin that brings full double-entry accounting to WordPress — chart of accounts, journal entries, financial statements, PDF export, WooCommerce integration, and a REST API.
Features
- Double-entry ledger — every transaction balances debits and credits; corrections are new entries, nothing is ever overwritten
- Chart of Accounts — ASSET, LIABILITY, EQUITY, REVENUE, EXPENSE with subtypes; active/inactive toggle
- Financial Statements — Balance Sheet, Income Statement, Cash Flow Statement, Trial Balance, General Ledger; all with PDF download (Dompdf)
- Recurring Journal Entries — templates that post automatically via WP-Cron (monthly, quarterly, annually) with idempotency protection
- WP Dashboard Widget — monthly P&L snapshot (Revenue, Expenses, Net Income, Cash Balance)
- WooCommerce Integration — automatically journals WC orders and refunds; customer PDF invoices on My Account
- REST API —
wpledger/v1namespace, authenticated with WordPress Application Passwords; endpoints for companies, journal entries, and reports - QuickBooks CSV export — IIF-style export for importing into external accounting software
- Multi-company — manage separate books for multiple entities in one install
Requirements
- WordPress 6.0+
- PHP 8.0+
- MySQL 5.7+ / MariaDB 10.3+
- Composer (for local development)
Installation
From wordpress.org (recommended)
Search for WPLedger Accounting in Plugins → Add New.
Manual
- Download
wpledger-0.1.0.zipfrom the releases page - Upload via Plugins → Add New → Upload Plugin
- Activate — tables are created automatically on activation
From source
git clone https://github.com/ibuilder/WPLedger.git
cd WPLedger
composer install
Copy or symlink the folder into wp-content/plugins/, then activate.
Building a submission zip
.\build.ps1
Produces wpledger-0.1.0.zip — a clean, production-ready archive with dev files, hidden files, and unnecessary vendor stubs stripped out.
Database tables
All tables use the WordPress table prefix + wpl_:
| Table | Purpose |
|---|---|
wpl_companies |
Company/entity records |
wpl_accounts |
Chart of accounts |
wpl_journal_entries |
Journal entry headers |
wpl_journal_lines |
Individual debit/credit lines |
wpl_recurring_entries |
Recurring entry templates |
Tables are created via dbDelta() on activation and dropped cleanly by uninstall.php.
Accounting invariants
- Every entry has ≥ 2 lines; total debits must equal total credits
- Balances are never stored — they are always derived from the ledger
- Assets = Liabilities + Equity (Balance Sheet
balancedflag) - Net cash change = change in cash-flagged accounts (Cash Flow
reconcilesflag) - All monetary values are
DECIMAL(18,2); PHP arithmetic usesbcmath
Architecture
wpledger.php — plugin header + bootstrap
includes/
Admin/ — AdminMenu, DashboardWidget
Db/ — Schema (dbDelta table creation)
Export/ — QuickBooksExporter
Integrations/ — WoocommerceSync, WcInvoice
Pdf/ — PdfRenderer (Dompdf wrapper)
Rest/ — RestCompanies, RestJournal, RestReports, RestIntegrations
Services/ — Ledger, Statements, Recurring
assets/
css/admin.css
js/admin.js
vendor/ — Composer dependencies (Dompdf, Masterminds HTML5, etc.)
License
GPL-2.0-or-later — see LICENSE