Royal Ledger Documentation
Complete guide to tracking WordPress site costs, managing renewal calendars, and storing license keys with AES-256 encryption using Royal Ledger.
Getting Started
Royal Ledger helps you track every cost associated with your WordPress site — plugins, hosting, domains, SaaS subscriptions — and securely store license keys with AES-256 encryption. See your monthly burn rate, renewal calendar, and export everything.
Why Track Site Costs
Budget Clarity
Know exactly what your site costs each month and year. No more surprise renewals or forgotten subscriptions.
License Key Safety
Store license keys with military-grade AES-256-CBC encryption. Never lose a key in an email thread again.
Renewal Management
Get email reminders before renewals hit. See a calendar view of upcoming payments.
Migration Ready
Export full backups with decrypted keys for migration. Import on any WordPress site with automatic re-encryption.
Requirements
- WordPress 5.9 or higher
- PHP 7.4 or higher
Installation
From WordPress.org
Search for the plugin
In your WordPress admin, go to Plugins > Add New and search for "Royal Ledger"
Install and activate
Click "Install Now" then "Activate" once installation completes
Navigate to Royal Ledger
Find "Royal Ledger" in your WordPress admin sidebar menu to begin tracking costs
Manual Installation
Download the plugin
Download the ZIP file from WordPress.org
Upload to WordPress
Go to Plugins > Add New > Upload Plugin, select the ZIP file, and click Install Now
Activate the plugin
Click "Activate Plugin" after installation completes
Quick Start
Start tracking your WordPress costs in under 5 minutes:
Navigate to Royal Ledger
Find "Royal Ledger" in your WordPress admin sidebar
Add your first cost item
Click "Add Item", enter the name, category, cost, and billing cycle
Store a license key
On the Keys tab, add a key name and paste your license key. It is encrypted automatically.
Set renewal dates
Add renewal dates to get email reminders before payments are due
Check your dashboard
View your monthly/annual costs and spending breakdown chart
Use the Plugin Auto-Detection feature to automatically scan your installed plugins and create cost items for premium ones. It skips free WordPress.org plugins.
Adding Cost Items
Cost items are the core of Royal Ledger. Each item represents a recurring or one-time expense related to your WordPress site.
How to Add an Item
Click "Add Item"
Click the "Add Item" button on the main Royal Ledger page
Fill in the details
Enter the item name, select a category, enter the cost (decimal values supported), choose a currency, select the billing cycle, set a renewal date, and optionally add a URL and notes
Save the item
Click Save. The item will appear in your cost list and be included in your monthly/annual cost calculations.
Item Fields
| Field | Required | Description |
|---|---|---|
| Name | Yes | The name of the cost item (e.g., "WP Rocket", "SiteGround Hosting") |
| Category | Yes | One of 6 categories: Plugins, Themes, Hosting, Domains, SaaS Services, Other |
| Cost | Yes | The cost amount as a decimal (e.g., 49.99) |
| Currency | Yes | The currency for this item (default: USD) |
| Billing Cycle | Yes | Monthly, Annual, One-Time, Lifetime, or Custom |
| Renewal Date | No | When the next renewal payment is due |
| URL | No | Link to the product or service page |
| Notes | No | Any additional notes about this cost item |
Categories & Status
Categories
Royal Ledger organizes cost items into 6 categories for clear spending breakdowns:
| Category | Use For |
|---|---|
| Plugins | Premium WordPress plugins, plugin licenses, plugin subscriptions |
| Themes | Premium WordPress themes, theme licenses, theme subscriptions |
| Hosting | Web hosting, managed WordPress hosting, VPS, cloud servers |
| Domains | Domain name registrations, domain renewals, premium domains |
| SaaS Services | Third-party services like CDNs, email providers, analytics tools |
| Other | Anything that does not fit the above categories |
Statuses
Each cost item has one of 4 statuses:
| Status | Description |
|---|---|
| Active | Currently active and being tracked in cost calculations |
| Cancelled | Subscription has been cancelled but may still be usable until expiry |
| Trial | Currently on a free trial period |
| Expired | Renewal date has passed. Items are automatically set to expired by a daily cron job. |
Billing Cycles
Royal Ledger supports 5 billing cycle types to accurately reflect how you are billed for each service:
| Cycle | Description | Cost Calculation |
|---|---|---|
| Monthly | Billed every month | Monthly cost = entered amount. Annual cost = amount x 12. |
| Annual | Billed once per year | Annual cost = entered amount. Monthly cost = amount / 12. |
| One-Time | Single payment, no renewal | Not included in recurring cost calculations |
| Lifetime | Single payment for permanent access | Not included in recurring cost calculations |
| Custom | Set a custom number of days for the billing interval | Cost is prorated to monthly/annual based on the custom day count |
When you select "Custom", an additional field appears where you can enter the number of days in the billing cycle. For example, enter 90 for a quarterly billing cycle or 180 for semi-annual.
Editing & Deleting Items
Editing
Click on any cost item in your list to open it for editing. All fields are updateable, including the name, category, cost, billing cycle, renewal date, URL, and notes. Changes are saved immediately when you click Save.
Deleting
To delete a cost item, click the delete button on the item. A confirmation dialog will appear before the item is permanently removed.
Deleting a cost item also permanently removes all license keys associated with that item. Export a JSON backup before deleting if you need to preserve the keys.
Adding License Keys
Each cost item can have multiple license keys stored against it. Keys are encrypted automatically the moment you save them.
How to Add a Key
Open a cost item
Click on any cost item to open its details
Navigate to the Keys tab
Click the "Keys" tab within the item details
Enter key details
Fill in the key name, paste your license key, and optionally add the activation URL, expiry date, and notes
Save
Click Save. The key is encrypted with AES-256-CBC and stored securely in the database.
Key Fields
| Field | Description |
|---|---|
| Key Name | A descriptive name for this key (e.g., "Production Site License") |
| License Key | The actual license key or serial number |
| Activation URL | The site URL this key is activated on (optional) |
| Expiry Date | When this key expires (optional) |
| Notes | Any additional notes about this key (optional) |
Encryption Details
Royal Ledger uses industry-standard encryption to protect your license keys at rest in the WordPress database.
How It Works
- Algorithm: AES-256-CBC (Advanced Encryption Standard with 256-bit keys in Cipher Block Chaining mode)
- Key Derivation: Your WordPress
AUTH_KEYandAUTH_SALTconstants fromwp-config.phpare used to derive the encryption key - Tamper Detection: HMAC (Hash-based Message Authentication Code) is applied to each encrypted key to detect any tampering or data corruption
- In-Memory Only: Keys are only decrypted in memory when you view them. They are never stored as plaintext in the database.
Your license keys are encrypted using your WordPress security salts. If you change your salts (in wp-config.php), existing encrypted keys will become unreadable. Export a JSON backup BEFORE changing salts.
Copy & Security
Royal Ledger includes security-conscious features for working with your decrypted license keys.
One-Click Copy
Click the copy button next to any license key to copy it to your clipboard instantly. No need to manually select and copy the text.
Auto-Hide
After copying a key, the decrypted value is automatically hidden again after 30 seconds. This prevents keys from being visible on screen longer than necessary, reducing the risk of shoulder surfing or screen capture.
Limit admin access to your WordPress site to trusted users only. Anyone with admin access can view decrypted license keys through Royal Ledger.
Calendar View
The renewal calendar provides a visual month-by-month view of all upcoming renewals, helping you plan your budget and avoid missed payments.
How It Works
- Each month shows color-coded dots representing renewal events
- Click on a month to see all renewals due in that period
- Items are sorted by renewal date within each month
- The calendar shows the total cost of renewals for each month
The calendar only displays renewals for items with "Active" or "Trial" status. Cancelled and expired items are excluded from the calendar view.
Email Reminders
Royal Ledger can send you email reminders before a renewal is due, so you never miss a payment or forget to cancel a service you no longer need.
Configuration
- Alert Window: Choose to receive reminders 7, 14, or 30 days before a renewal date
- Recipient Email: Set the email address where reminders should be sent (defaults to the WordPress admin email)
- Enable/Disable: Toggle email notifications on or off from the Settings page
Set the alert window to 14 days. This gives you enough time to review and decide whether to renew or cancel before the payment processes.
Auto-Expiry
Royal Ledger automatically tracks renewal dates and updates item statuses without manual intervention.
How It Works
- A daily cron job runs automatically to check all items with renewal dates
- Any item whose renewal date has passed is automatically changed to "Expired" status
- Expired items are excluded from monthly/annual cost calculations
- You can manually reactivate an expired item if you renew it
Auto-expiry relies on WordPress cron (wp-cron). If your site has low traffic, cron jobs may not run on schedule. Consider using a real cron job via your hosting panel or a plugin like WP Crontrol for more reliable scheduling.
Plugin Auto-Detection
Royal Ledger can automatically scan your installed WordPress plugins and create cost items for premium ones, saving you the effort of adding them manually.
How It Works
Scan installed plugins
Royal Ledger checks each installed plugin against the WordPress.org API
Identify premium plugins
Plugins that are NOT found on WordPress.org are flagged as premium/custom plugins that likely have a cost
Create cost items
Cost items are automatically created for identified premium plugins. You can then add the price, billing cycle, and license keys.
Free plugins from WordPress.org are automatically skipped. Only premium, custom, or paid plugins generate cost items. You can delete any false positives.
Export (CSV/JSON)
Royal Ledger supports two export formats, each designed for different use cases.
CSV Export
- Exports all cost items WITHOUT license keys
- Safe to share with accountants, bookkeepers, or team members
- Compatible with Excel, Google Sheets, and any spreadsheet application
- Includes item name, category, status, cost, billing cycle, renewal date, and notes
JSON Export
- Full backup INCLUDING decrypted license keys
- Designed for site migration between WordPress installations
- Keys are decrypted during export and re-encrypted on import using the destination site's salts
- Includes all item data, license keys, and settings
JSON exports contain decrypted license keys in plaintext. Store JSON export files securely, transfer them only over encrypted connections, and delete them after import is complete.
Import
Restore your cost data from a previously exported file. Royal Ledger supports importing from both JSON and CSV formats.
JSON Import
- Restores all cost items AND license keys
- License keys are automatically re-encrypted using the current site's WordPress salts
- Settings and preferences are also restored
CSV Import
- Creates cost items from CSV data
- License keys are NOT included in CSV imports
- Useful for importing cost data from spreadsheets or other tracking tools
Import checks for existing items by name to avoid creating duplicates. If an item with the same name already exists, it will be updated rather than duplicated.
Dashboard Widget
Royal Ledger adds a widget to your WordPress admin dashboard providing an at-a-glance summary of your site costs.
Widget Contents
- Monthly Cost - Your total recurring monthly cost across all active items
- Annual Cost - Your total projected annual cost across all active items
- Active Items - The number of currently active cost items being tracked
- Upcoming Renewals - The next 3 upcoming renewals with dates and amounts
Click on any item in the dashboard widget to jump directly to the full Royal Ledger cost management page.
Settings
Configure Royal Ledger's behavior from the Settings page.
Currency
Select your default currency for new cost items. This does not retroactively change existing items. Default: USD.
Email Notifications
- Enable/Disable - Toggle renewal email reminders on or off
- Alert Window - Choose how many days before a renewal to send the reminder (7, 14, or 30 days)
- Recipient Email - The email address where reminders are sent. Defaults to the WordPress admin email.
Auto-Detect Plugins
Toggle the automatic plugin scanning feature on or off. When enabled, Royal Ledger will periodically scan for new premium plugins and suggest creating cost items for them.
Troubleshooting
Keys showing garbled text
- Your WordPress security salts (
AUTH_KEY,AUTH_SALT) may have changed since the keys were stored. - If you recently migrated your site or regenerated salts, previously encrypted keys cannot be decrypted.
- Solution: Re-enter the affected license keys manually. To prevent this in the future, always export a JSON backup before changing salts.
Email reminders not sending
- Verify that email notifications are enabled in Royal Ledger settings.
- Check if WordPress cron is running. Install WP Crontrol to inspect and manually run cron events.
- Verify your WordPress site can send emails. Install an SMTP plugin like Royal SMTP for reliable email delivery.
- Check the recipient email address in settings to make sure it is correct.
Dashboard widget not loading
- Ensure Chart.js is not blocked by a Content Security Policy (CSP) on your site.
- Check the browser console (F12 > Console) for any JavaScript errors.
- Try deactivating other plugins temporarily to check for conflicts.
- Clear your browser cache and any caching plugins.
If you are experiencing an issue not covered here, visit the WordPress.org support forum or contact us at support@royalplugins.com.
Frequently Asked Questions
Is the encryption secure?
Yes. AES-256-CBC is the same encryption standard used by banks and military applications. Combined with HMAC tamper detection, your keys are protected at rest in the database. Keys are only decrypted in memory when you explicitly view them.
Can I move keys to another site?
Yes. Use JSON Export to create a full backup including decrypted keys. Import the JSON file on the new site and keys will be automatically re-encrypted using that site's WordPress security salts.
Does it work on multisite?
Yes. Each site in a WordPress multisite network tracks costs independently with its own encryption keys derived from that site's WordPress salts.
Does it phone home?
No. Royal Ledger stores everything locally in your WordPress database. There are zero external API calls and no SaaS dependency. The only outbound request is the WordPress.org API check during plugin auto-detection, and that only runs when you trigger it.
What happens if I deactivate the plugin?
Your data remains safely in the database. Reactivating the plugin will restore access to all your cost items and encrypted license keys. Uninstalling the plugin (deleting it) will permanently remove all data.
Can I track costs for multiple sites?
Royal Ledger tracks costs for the site it is installed on. To track costs across multiple sites, install it on each site individually. For a centralized view, use the JSON export from each site.