PHPackages                             sledgehammer/wordpress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sledgehammer/wordpress

ActiveLibrary

sledgehammer/wordpress
======================

Wordpress database access via the Sledgehammer ORM

18.08.0(7y ago)0776CC-BY-SA-3.0PHP

Since Apr 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sledgehammer/wordpress)[ Packagist](https://packagist.org/packages/sledgehammer/wordpress)[ RSS](/packages/sledgehammer-wordpress/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (5)Used By (0)

Sledgehammer Wordpress
======================

[](#sledgehammer-wordpress)

Adds Sledgehammer goodies
-------------------------

[](#adds-sledgehammer-goodies)

- DebugR intergration (includes the wpdb query log).
- Statusbar
- PDO database access.
- ORM access to wordpress models

### Devutils

[](#devutils)

- Export Post - An post\_id independend export of an wp\_posts record.
- Diff options - Compare diffences in the contents of the wp\_options table.

Installation
------------

[](#installation)

Install with composer, in the root of the wordpress project run:

```
composer require sledgehammer/wordpress

```

Edit `wp-config.php` and add at the **bottom** (after the require `wp-settings.php`):

```
require_once(ABSPATH.'vendor/autoload.php');
Sledgehammer\Wordpress\Bridge::initialize();
require_once(ABSPATH.'vendor/sledgehammer/core/src/render_public_folders.php');
```

Disable web access to the vendor folder.
(For Apache httpd: Add a `.httaccess` file into the vendor folder with `Deny from all`)

Configuration
-------------

[](#configuration)

The bridge looks at constants defined in the wp-config to auto-configure sledgehammer.

```
WP_DEBUG: Enable the errorhandler & statusbar
SAVEQUERIES: Enables the sql query log
DB_*: Connect to the database, if needed
WP_HOME: Detect public folder

```

To measure initialization add the following line line at the **beginning** of the `wp-config.php`:

```
define('Sledgehammer\STARTED', microtime(true));
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~262 days

Total

4

Last Release

2885d ago

Major Versions

16.x-dev → 18.05.02018-05-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/207248?v=4)[Bob Fanger](/maintainers/bfanger)[@bfanger](https://github.com/bfanger)

---

Top Contributors

[![bfanger](https://avatars.githubusercontent.com/u/207248?v=4)](https://github.com/bfanger "bfanger (41 commits)")

### Embed Badge

![Health badge](/badges/sledgehammer-wordpress/health.svg)

```
[![Health](https://phpackages.com/badges/sledgehammer-wordpress/health.svg)](https://phpackages.com/packages/sledgehammer-wordpress)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[sebastian/comparator

Provides the functionality to compare PHP values for equality

7.0k879.8M145](/packages/sebastian-comparator)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[codeception/codeception

All-in-one PHP Testing Framework

4.9k86.2M2.9k](/packages/codeception-codeception)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
