Test Environment:
- Bun version: 1.2.13 (JavaScriptCore)
- Node.js version: v22.20.0 (V8)
- Platform: Linux (NixOS)
- Date: 2026-01-23
| #!/usr/bin/env php | |
| <?php | |
| /** | |
| * Composer Fast Resolve - Fast parallel dependency resolution | |
| * | |
| * Resolves all transitive dependencies from a composer.json and outputs | |
| * a new composer.json with all dependencies explicitly listed. | |
| * | |
| * Usage: | |
| * php composer-shrinkwrap.php composer.json > composer-shrinkwrap.json |
| { | |
| "plugins": ["wp-staging"], | |
| "steps": [ | |
| { | |
| "step": "writeFile", | |
| "path": "/wordpress/wp-content/mu-plugins/shim_mysqli.php", | |
| "data": { | |
| "resource": "url", | |
| "url": "https://gist.githubusercontent.com/adamziel/51ac62858a97937a84a4c4b9e8dea463/raw/9185e69fc9e7d36f276e72aba92944107fd94bed/shim_mysqli.php" | |
| } |
URL Rewriting in WordPress importer demo.
| """ | |
| Serves a syntax-highlighted, source-mapped, debuggable file to Chrome devtools | |
| over the CDP protocol. | |
| """ | |
| import asyncio | |
| import websockets | |
| import json | |
| import base64 |
| rm out.txt | |
| PHP=7.4 node --stack-trace-limit=100 --loader=./packages/meta/src/node-es-module-loader/loader.mts ./packages/php-wasm/cli/src/main.ts test.php &> out.txt | |
| cat out.txt | bun packages/meta/bin/verify-asyncify-functions.ts |
| // build.mjs | |
| import esbuild from 'esbuild' | |
| import importUrlPlugin from './import-url-plugin.ts'; // the plugin shown earlier | |
| await esbuild.build({ | |
| entryPoints: ['src/index.ts'], | |
| bundle: true, | |
| outdir: 'build', | |
| format: 'esm', | |
| platform: 'browser', // change to 'node' if you bundle for Node |
| <?php | |
| /** | |
| * Data Liberation Boilerplate | |
| * 1. Clone the https://github.com/wordPress/php-toolkit/ repo | |
| * 2. Switch to branch push-qvpwqtzqzyrw (this PR https://github.com/WordPress/php-toolkit/pull/127) | |
| * 3. Put this file in the repo root | |
| * 4. Adjust the require paths below | |
| * 5. Run the script | |
| * |
| Can you run WordPress on PostgreSQL? | |
| Not yet, but this Gist gets you closer. This is a PostgreSQL driver | |
| for https://github.com/Automattic/sqlite-database-integration. I've | |
| generated it by asking AI to port the SQLite driver to PostgreSQL driver. | |
| It parses a MySQL query and runs a corresponding PostgreSQL query. Some | |
| queries work, some don't, the escaping is a mess, but it's a good first draft. |