WPBench is the Geekbench of WordPress β a reproducible, hardware-sensitive benchmark designed to help you compare CPU performance across different hosting environments.
WordPress requests run single-threaded. CPU performance matters. WPBench helps you:
- β‘ Compare hardware objectively across VPS providers
- π Measure real performance with reproducible benchmarks
- π― Focus on what matters - single-thread PHP execution, not page size or CSS minification
- π§ Test accurately with proper warm-up, percentiles, and environment fingerprinting
- Quick Test: Reproducible benchmark of core WordPress (bootstrap, queries, templates)
- URL Test: Real-world testing with your theme, plugins, and content
- Dual Drivers: WP-CLI (in-process) and HTTP (full-stack) modes
- Composite Scoring: Single WPBench Score for easy comparison
- Environment Fingerprinting: CPU, PHP, OPcache, database captured with each run
- Compare Results: Side-by-side with percentage deltas
- Export/Import: JSON for sharing across servers
- Full WP-CLI Support: Automation-ready
- Go to Plugins > Add New
- Search for "WPBench"
- Click Install and Activate
git clone https://github.com/parhamfa/wpbench.git
cd wpbench
npm install
npm run buildThen upload to wp-content/plugins/ and activate.
Download the latest release and upload via WordPress admin.
- Navigate to WPBench in your WordPress admin
- Go to Quick Test tab
- Click Run Quick Test
- View your WPBench Score!
# Run quick benchmark
wp wpbench quick --iterations=30
# Test specific URLs
wp wpbench urls --url="/" --url="/blog" --iterations=20
# Export results
wp wpbench quick --output=results.json --format=json
# Test from file
echo -e "/\n/blog\n/about" > urls.txt
wp wpbench urls --file=urls.txt --driver=httpWPBench Score formula:
Score = 1000 Γ (baseline_time / your_time)
- Score = 1000: Matches baseline hardware
- Score > 1000: Faster than baseline (better CPU)
- Score < 1000: Slower than baseline
Example: If you score 1500, your hardware is 50% faster than the baseline.
For accurate, comparable results:
β Keep OPcache enabled β Run when server is idle (no traffic) β Use consistent iterations β Compare same test types β Bypass caching for raw performance
β Don't compare HTTP vs WP-CLI β Don't test during traffic β Don't compare different test types
- Deploy identical site to multiple providers
- Run same benchmark on each (e.g.,
wp wpbench quick --iterations=50) - Compare WPBench Scores
- Choose the provider with better CPU performance
# PHP 7.4
wp wpbench quick --iterations=30 --output=php74.json
# Upgrade to PHP 8.2
# ...
# PHP 8.2
wp wpbench quick --iterations=30 --output=php82.json
# Compare results in admin UI- Run benchmark:
wp wpbench quick --output=before.json - Upgrade CPU/hosting plan
- Run benchmark:
wp wpbench quick --output=after.json - Import both in admin to see improvement percentage
- Single-threaded sequential execution
- High-res timing (hrtime/microtime fallback)
- CPU measurement via getrusage()
- Percentiles (P50/P95) calculated from samples
- Warm-up cycles before timed runs
- Environment guards for load and OPcache checks
POST /wp-json/wpbench/v1/test/quick
POST /wp-json/wpbench/v1/test/url
GET /wp-json/wpbench/v1/runs
GET /wp-json/wpbench/v1/runs/{id}
GET /wp-json/wpbench/v1/runs/{id}/export
POST /wp-json/wpbench/v1/import
GET /wp-json/wpbench/v1/settings
POST /wp-json/wpbench/v1/settings
use WPBench\Engine\BenchmarkRunner;
$runner = new BenchmarkRunner();
// Quick test
$result = $runner->run_quick_test([
'iterations' => 30,
'driver' => 'wpcli',
]);
// URL test
$result = $runner->run_url_test(
['/', '/blog'],
['iterations' => 20, 'driver' => 'http']
);- PHP 7.4+
- WordPress 6.1+
- Node.js 18+
- Composer (optional)
git clone https://github.com/parhamfa/wpbench.git
cd wpbench
npm install
composer install # optional# Development
npm start
# Production
npm run buildwpbench/
βββ wpbench.php # Main plugin file
βββ includes/ # PHP classes
β βββ Data/ # Database layer
β βββ Engine/ # Benchmark engine
β βββ Env/ # Environment fingerprinting
β βββ Http/ # REST API & middleware
β βββ Cli/ # WP-CLI commands
βββ admin/
β βββ assets/
β βββ src/ # React admin UI
βββ composer.json
βββ package.json
βββ readme.txt # WordPress.org readme
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Q: Why do I need OPcache? A: Without OPcache, you're measuring PHP parsing, not execution. All production sites use OPcache, so benchmarks should too.
Q: Can I use this to find slow plugins? A: No. WPBench measures hardware, not code quality. Use profiling tools like Query Monitor for debugging.
Q: Should I test with caching enabled? A: For hardware comparison, use bypass cache mode. For "real world" tests, enable caching.
Q: Why can't I compare HTTP and WP-CLI results? A: They measure different things. HTTP includes web server overhead. Keep driver consistent when comparing.
- v1.1: Major cache plugin detection improvements
- v1.2: Optional anonymous leaderboard
- v1.3: Historical trending charts
- v2.0: Optional concurrent stress profiles
GPL-2.0-or-later
Built with:
Inspired by:
- Geekbench
- Industry-standard CPU benchmarking methodologies
- Documentation: wpbench.com/docs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with β‘ for the WordPress community