WordPress is an open-source content management system used by over 40% of all websites worldwide. While WRCode’s primary focus is secure automation, its mechanisms offer powerful security implications for platforms like WordPress — which are frequently targeted by malicious actors. We aim to enable WRCode-verified WordPress setups, where all core files, themes, and plugins are WRStamped. In this model, any unauthorized modification or silent code injection immediately invalidates the WRStamp, making the change cryptographically detectable. A WRCode WordPress installation would detect any code change or injection immediately, making it extremely difficult for attackers to introduce harmful vectors without being noticed. This would make silent compromises — which currently go unnoticed — a thing of the past.
Such a system could transform WordPress from a widely exploited attack surface into a proof-based, jurisdiction-enforced platform. In the broader vision, WRCode could also be used to secure login workflows for WordPress — but only on installations that are fully WRStamped and compliant with defined integrity standards. This would prevent login scripts or authentication mechanisms from being silently tampered with. Given the scale and influence of WordPress worldwide, this platform clearly qualifies as a priority candidate for secure-by-design implementation under the WRCode model. Implementing WRCode on platforms like WordPress demonstrates the broader power of cryptographically verifiable origin — even in systems that were never designed with deep trust enforcement in mind.
🔄 Real-World Impact
This changes everything:
- Developers who offer code in public libraries can be held accountable if their work is misused or corrupted.
- Businesses can verify and filter digital supply chains based on geography, not branding.
- Governments and critical infrastructure providers gain a tool for preventing attacks based on mathematical origin control, not firewalls and guesswork.
- Individuals get the right to say: “I do not want to receive code or messages from unverifiable sources.”
Integrity checks are standard in high-risk infrastructure—but almost unheard of in WordPress or other open-source systems. Open source should not be the second choice when it comes to security.
WRGuard’s mission is to make it the first.
- WRGuard brings that missing layer to the open web.
No more blind trust. No more silent breaches.
Just cryptographic proof that what runs is what was intended. - Because security should be built-in, not bolted on.
And open source deserves real defenses.
🔐 WRStamped Runtime Enforcement Framework
Trust every line — or run nothing. The internet runs on assumption:
That plugins are clean. That themes aren’t tampered with. That secrets are safe because files “look untouched.” Visual polish can be deceiving. Without verifiable identity and code integrity, even the most professional-looking service may be a well-disguised threat.But these assumptions don’t hold up — especially on platforms like WordPress, where dynamic code execution, auto-updates, and weak file controls are the norm.
The WRStamped Runtime Enforcement Framework replaces that assumption with cryptographic trustless security.
✅ Every line of executable code must reside in a WRStamped file.
❌ If even a single line of running code is not WRStamped — the system halts.
🧱 Zero-Exception Integrity
The WRStamped model enforces total file integrity across the entire runtime stack. It doesn’t “scan for threats” — it refuses to run unverified code.
Component | WRStamped Required |
Plugins | ✅ |
Themes | ✅ |
SQL execution paths | ✅ (via Merkle-root trust chain) |
Vault/decryption logic | ✅ |
WordPress core overrides | ✅ |
Custom PHP/JS code | ✅ |
Shortcodes, handlers | ✅ |
Only the media upload folder is exempt — and only under strict filetype and MIME restrictions (no .php, .js, .sh, .bin).
🔑 Secrets Are Bound to Verified Code
Credentials (like DB passwords, API tokens, or SMTP keys) are:
- Stored encrypted, outside of plaintext files like wp-config.php
- Decrypted only at runtime — and only if:
- The full runtime passes WRStamp verification
- No file has been added, removed, or altered
🔐 If one WRStamp breaks, the decryption fails — and the system enters lockdown.
There is no fallback, no override, no “admin mode.” Integrity is not optional.
🧠 Query Logic: No Rewrite Needed — Just a Verified Roof
WRCode supports inline SQL logic, as long as the execution path is WRStamped.
- The system uses a Merkle-style trust tree to validate all query-relevant files
- If the file or logic that generates or executes a query is not WRStamped → the query is blocked
- No need to rewrite every SQL call — just verify the full path leading to it
A query must live under a cryptographic roof. If the roof leaks, nothing goes through.
⚔️ Licensing Without eval() — A New Standard for Proprietary Software
Under WRCode, legacy techniques like eval() and runtime code injection are no longer permitted — and no longer necessary.
For decades, plugin vendors used eval() to:
- Inject licensing logic dynamically
- Obfuscate proprietary code
- Load remote conditions or toggles at runtime
These approaches were not only insecure — they became the primary attack vector for malware, piracy workarounds, and supply chain attacks. WRCode ends this era. Licensing and feature control can now be enforced without exposing logic or relying on dynamic execution.
✅ How WRCode Handles Licensing — Without eval()
Licensing is now bound directly to:
- A WRCode account or device identity
- A zero-knowledge proof (ZKP) that validates license state without revealing logic
- A WRStamped module that defines licensed behavior in advance
Need | Legacy Method | WRCode Approach |
Verify license | eval() or dynamic callbacks | ZKP bound to WRCode account or device |
Tiered access | Inline PHP switches or remote API | Pre-stamped modules with license scope |
Trial expiry | Obfuscated timestamp logic | Enforced through time-bound WRStamp policy |
Piracy protection | Obfuscated logic injection | Immutable, tamper-proof execution paths |
The result:
No runtime tampering
- No secret logic injection
- No trust-by-obscurity
- No open-source requirement
🔐 Proprietary Code Is Still Welcome
WRCode does not require that your code be public.
You can deliver closed-source, obfuscated modules — as long as they are:
- Pre-compiled
- Cryptographically WRStamped
- Immutable at runtime
You keep your IP. But you lose the ability to inject or modify logic after deployment.
This isn’t about transparency. It’s about verifiability and user safety.
🧱 Tools for Licensing Without Risk
To support commercial vendors, WRCode provides everything needed to migrate securely:
Tool | Purpose |
📦 Plugin Signing Kit | Securely package licensed logic into pre-approved modules |
🧱 WRStamp CLI | Stamp all files and anchor them to your vendor identity |
🔁 Policy Loader | Bind features, trials, or usage scopes to verified tokens |
✅ Final Word
Licensing, feature control, and commercial protections don’t need eval().
They don’t need obfuscation.
They just need integrity — enforced cryptographically and verified before runtime.
WRCode isn’t limiting what you can offer.
It’s limiting how you offer it — in favor of security, trust, and long-term accountability
✅ WRCode will make it easy to comply — but we will not lower the bar for compatibility.
🚨 Lockdown Response If any WRStamp fails:
- 🔒 Credentials stay encrypted
- ❌ DB access is denied
- 🧨 Plugins/themes are blocked
- ⚠️ Logs and alert triggers fire
- 🔐 The system enters fail-closed lockdown
This is not a “warning plugin.” This is execution enforcement.
🌍 Why We Start With WordPress
Because WordPress powers over 40% of the internet — and remains one of the most targeted ecosystems for automated attacks and backdoor injections.
By starting with WordPress, WRCode:
- Protects the highest-risk surface
- Establishes the WRStamp standard where it matters most
- Creates an example that other ecosystems will follow
After WordPress, we will expand into:
- Laravel / Symfony (PHP)
- Node.js stacks (Express, Next.js)
- Python backends (FastAPI, Django)
- Other CMS
✅ Summary: WRCode doesn’t scan for threats.
It prevents them — by refusing to run untrusted code.
Situation | Result |
File is WRStamped | ✅ Executes |
File is missing/modified | ❌ Execution denied |
Plugin generates code at runtime | ❌ Blocked unless pre-WRStamped |
Plugin uses eval/license logic | ❌ Incompatible (use WRCode API/SDK) |
Plugin uses signed static modules | ✅ Fully compliant |
Query called from trusted stack | ✅ Executes |
Query called from unknown origin | ❌ Blocked |
⚖️ Plugin vendors can still protect their code, enforce licensing, and ship commercial features —
They just have to do it transparently, verifiably, and securely.
🛡️ WRCode doesn’t eliminate all attack vectors — but it raises the bar so high that, when all guidelines are enforced, most automated exploit chains and common hacker tactics become practically obsolete.
No WRStamp. No Execution. Trustless Security
That’s the new standard.
🔐 WRGuard for WordPress- Technical Flow
🗂️ Outline
- WRStamped Core Hashing – Ensure the WordPress core and critical runtime files are immutable and verifiable.
- WRLogin Plugin – A hardened login mechanism that strictly uses WRCode-based authentication. Simple QR code scans are not sufficient; only WRCode-compliant tokens are accepted for secure access.
- Encrypted Credentials Vault – Database access credentials are encrypted and only unlocked on successful verification.
- php Guard Layer – The WordPress boot process is halted unless all integrity checks pass.
- WRGuard Dev accounts: Developer Toolkit for Plugin WRStamping – Allow plugin authors to generate signed WRStamps for secure distribution.
🛠 WRGuard Dev Accounts: Developer Toolkit for Plugin WRStamping
To open a WRGuard Developer Account, plugin authors must complete a domain-based proof-of-origin verification. This process ensures that only verified domain owners — those who control a valid and traceable web property — can generate and attach WRStamps to their distributed software (e.g., WordPress plugins).
This binding of code to a verifiable domain origin helps establish a trusted and auditable software supply chain, preventing anonymous or spoofed plugin distributions.
Importantly, the proof-of-origin process is explicitly designed to preserve privacy. It does not track or require the developer’s exact location or identity. Instead, the verification only establishes a country-level origin, such as the country in which the domain is registered or operated.
This country-based origin metadata is cryptographically attached to the WRStamp to allow recipients to validate authenticity without exposing any personal or precise geolocation data. The system is fully compliant with modern data protection regulations (e.g., GDPR) and reflects WRGuard’s commitment to privacy-first, trustless security design.
Overview
Traditional WordPress installations are highly vulnerable to file tampering, plugin abuse, and credential exposure. This article introduces a hardened WordPress deployment architecture using:
- ✅ WRStamped file integrity verification
- ✅ Encrypted database credentials
- ✅ Pre-bootstrap runtime check (before WordPress loads)
- ✅ Failsafe lockdown mechanism upon integrity failure
This setup ensures that WordPress will not boot and credentials remain encrypted unless all critical components are validated cryptographically.
🔄 Manifest Updates & Cryptographic Verification
Any change to the WordPress environment — such as installing a new plugin, updating existing code, or modifying the core — requires the WRStamped manifest to be updated. Once a new manifest is generated, it must be cryptographically verified and timestamped through Solana or a comparable tamper-evident ledger.
This ensures that:
- Only authorized changes are accepted and registered
- A traceable proof of the software state exists on-chain
- Future integrity checks have a canonical source of truth
If the manifest is not updated following a legitimate change, the system will block boot and encrypted secrets will remain locked.
🛠 WRGuard Plugin Overview
At the heart of this architecture is the WRGuard plugin — a hardened mu-plugin that fulfills multiple critical security roles:
- Acts as the WRCode-hardened login gateway, enforcing strict authentication via WRCode tokens only; users can either scan a valid WRCode or use an established pairing token during returning visits to initiate login
- Handles integrity verification for all WRStamped components
- Controls access to index.php, halting boot if verification fails
- Manages decryption of encrypted credentials, only unlocking secrets if system state is trusted
- Coordinates installation of new WRStamped plugins and updates to the WRStamped manifest
WRGuard is the central control mechanism that turns WordPress into a verifiable, tamper-aware platform. It executes early during boot and has full authority to allow or deny system operation based on verifiable cryptographic state.
🧩 Architecture Overview
Request
│
▼
index.php ◄── Validates WRStamped Manifest before loading WordPress
│
├── WRGuard::check_integrity()
├── WRGuard::decrypt_credentials()
▼
wp-config.php ◄── Receives DB credentials only if verified
▼
WordPress Core + Plugins
🛡️ Component Breakdown
- 🔒 WRStamped Manifest
To prevent tampering, the manifest itself must be protected against unauthorized modification. Simply storing it as a plaintext JSON file is not sufficient, as an attacker could forge hashes and deceive the system.
To ensure integrity:
- The manifest is signed using a trusted cryptographic key (e.g., Ed25519)
- The signature is verified before trust is established
- Both the manifest and credentials are encrypted during the initial installation phase to ensure full auditability and prevent post-deployment tampering. The manifest is only decrypted by authorized processes at runtime
To maintain auditability and security simultaneously, the WRGuard plugin provides a CLI/API function to finalize the current manifest, sign it, and submit it to a cryptographic ledger. This creates a tamper-evident, traceable fingerprint for future validation.
No updates to the manifest are accepted unless this controlled sealing process is explicitly triggered.
Each release of your WordPress distribution is signed with a WRStamped manifest, containing cryptographic hashes of:
- Core WordPress files (e.g. wp-includes/, wp-admin/)
- Critical runtime files like index.php, wp-config.php, mu-plugins/
- WRStamped plugin distributions, which are verifiably signed by their respective plugin providers
Example manifest:
{
“version”: “6.5.3”,
“hashes”: {
“index.php”: “a7f9…”,
“wp-includes/functions.php”: “44bc…”,
“wp-content/plugins/wrlogin/main.php”: “fae3…”
},
“signature”: “ots://abc123”
}
The manifest is either:
- Embedded in the bundle
- Pulled from a trusted registry
- Timestamping is executed through batch-anchoring on the Solana blockchain, enabling verifiable immutability.
- 🧱 index.php Guard Layer
Your index.php is wrapped to block execution unless all checks pass:
require_once __DIR__ . ‘/wr-guard/bootstrap.php’;
if (!WRGuard::check_integrity()) {
http_response_code(503);
exit(‘System integrity check failed. Execution halted.’);
}
require __DIR__ . ‘/wp-blog-header.php’;
🔐 This guarantees that no part of WordPress loads unless the integrity check passes.
- 🔑 Encrypted DB Credentials (.wrvault/db.enc)
The database credentials are not stored in plaintext inside wp-config.php.
Instead, they’re encrypted with Libsodium (crypto_secretbox) and stored in a separate file:
Encrypted file:
.wrvault/db.enc
Decryption only occurs if:
- All files pass hash verification
- Optional: A local hardware key or WRCode is detected
- The decryption key is accessible in the runtime environment (e.g. TPM, secure env var)
- 📄 wp-config.php Partial
Only calls the decryption API if WRGuard passes:
require_once __DIR__ . ‘/wr-guard/bootstrap.php’;
if (!WRGuard::check_integrity()) {
die(‘System integrity check failed.’);
}
$creds = WRGuard::load_db_credentials(); // returns associative array
define(‘DB_NAME’, $creds[‘name’]);
define(‘DB_USER’, $creds[‘user’]);
define(‘DB_PASSWORD’, $creds[‘pass’]);
define(‘DB_HOST’, $creds[‘host’]);
This means: no file or plugin alone can retrieve credentials, even if compromised.
⚙️ Implementation Notes
🔐 Credential Encryption via Sodium
Encryption:
$nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$ciphertext = sodium_crypto_secretbox($jsonData, $nonce, $key);
file_put_contents(‘.wrvault/db.enc’, $nonce . $ciphertext);
Decryption:
$data = file_get_contents(‘.wrvault/db.enc’);
$nonce = substr($data, 0, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$ciphertext = substr($data, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$plaintext = sodium_crypto_secretbox_open($ciphertext, $nonce, $key);
return json_decode($plaintext, true);
🧪 Hash Verification Logic
function check_integrity(): bool {
$manifest = json_decode(file_get_contents(__DIR__ . ‘/../wr.manifest.json’), true);
foreach ($manifest[‘hashes’] as $file => $expectedHash) {
$path = realpath(__DIR__ . ‘/../’ . $file);
if (!file_exists($path) || hash_file(‘sha256’, $path) !== $expectedHash) {
return false;
}
}
return true;
}
🔥 What Happens When a Hash Fails?
If any file is altered:
- WRGuard::check_integrity() returns false
- index.php immediately stops execution with an HTTP 503
- db.enc remains encrypted and never decrypted
- Optional: Admin gets notified via webhook or local log
👁️🗨️ Enhancements
Feature | Description |
YubiKey / WRCode login unlock | Unlock decryption key only after WR scan |
Cryptographic logging | Public tamper-evident logging of releases |
Hardware-bound key | Key never stored, only derived on secured device |
Multi-plugin WRVerification | Allow plugin authors to register their own WRStamps via CLI |
mu-plugin lockdown | Only enable WRLogin plugin if system is verified |
🧠 Why This Matters
Most WordPress infections work by:
- Replacing or injecting into functions.php, index.php, wp-includes/
- Reading plaintext DB credentials from wp-config.php
- Installing fake or malicious plugins
This architecture blocks all three vectors by:
- Detecting unauthorized code changes
- Refusing to decrypt secrets
- Stopping execution before WordPress even boots



