PHPackages                             tatter/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. [API Development](/categories/api)
4. /
5. tatter/wordpress

ActiveLibrary[API Development](/categories/api)

tatter/wordpress
================

WordPress content management for CodeIgniter 4

v1.0.1(5y ago)74373[5 PRs](https://github.com/tattersoftware/codeigniter4-wordpress/pulls)MITPHPPHP &gt;=7.2

Since Oct 1Pushed 3y ago2 watchersCompare

[ Source](https://github.com/tattersoftware/codeigniter4-wordpress)[ Packagist](https://packagist.org/packages/tatter/wordpress)[ Docs](https://github.com/tattersoftware/codeigniter4-wordpress)[ RSS](/packages/tatter-wordpress/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (10)Used By (0)

Tatter\\WordPress
=================

[](#tatterwordpress)

WordPress content management for CodeIgniter 4

[![](https://github.com/tattersoftware/codeigniter4-wordpress/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-wordpress/actions?query=workflow%3A%22PHPUnit)[![](https://github.com/tattersoftware/codeigniter4-wordpress/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-wordpress/actions?query=workflow%3A%22PHPStan)

Quick Start
-----------

[](#quick-start)

1. Install with Composer: `> composer require tatter/wordpress`
2. Add a new database connection:

```
	public $wordpress = [
		'DBDriver' => 'Tatter\WordPress\Database',
		'WPConfig' => '/path/to/wp-config.php',
	];

```

Description
-----------

[](#description)

**Tatter\\WordPress** provides a way for you to connect your CodeIgniter 4 instance to an existing WordPress installation.

Usage
-----

[](#usage)

This library comes with the `Reader` class, a parser designed to read configuration values from WordPress' **wp-config.php** file. By extracting database information and installation path, `Tatter\WordPress` can connect to the same database and modify information using the supplied models.

Database
--------

[](#database)

In order to use the database you need to define a new database group that uses the connection details provided by `Reader`. Add a property to **app/Config/Database.php**with the driver and the path to your **wp-config.php** file, like this:

```
class Database extends BaseConfig
{
	public $wordpress = [
		'DBDriver' => 'Tatter\WordPress\Database',
		'WPConfig' => '/path/to/wp-config.php',
	];

```

Models and Entities
-------------------

[](#models-and-entities)

This library defines Models and Entities that correspond to WordPress's database tables. You may use them like ordinary CodeIgniter 4 Models, but pay attention to WordPress's [particular database structure](https://codex.wordpress.org/Database_Description). "Meta" tables are handled via a special Entity extension `MetaHandler`, which allows read/write access to individual meta rows as class properties:

```
// Get a particular Post
$post = model('Tatter\WordPress\Models\PostModel')->find($postId);

// Access post metadata
echo $post->meta->_wp_page_template; // 'default'

// Update post metadata
$post->meta->_wp_page_template = 'mobile';

```

Commands
--------

[](#commands)

There are a few commands to make it easier to interact with your configuration - these are also a great way to make sure your WordPress database is set up correctly.

- `posts:list` - Lists all Posts in a table format
- `posts:show [postId]` - Displays details for a single Post
- `posts:delete [postId]...` - Deletes one or more Posts by their ID

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

2028d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ebe908b4fe73807ecdd9f88733342199c9991b7de800329f5b2b787c8210d62?d=identicon)[MGatner](/maintainers/MGatner)

---

Top Contributors

[![MGatner](https://avatars.githubusercontent.com/u/17572847?v=4)](https://github.com/MGatner "MGatner (50 commits)")

---

Tags

wordpresscodeignitercontentmanagementcodeigniter4

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[airesvsg/acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API

1.4k75.0k](/packages/airesvsg-acf-to-rest-api)[humanmade/mercator

WordPress multisite domain mapping for the modern era.

529180.9k3](/packages/humanmade-mercator)[wordpress/mcp-adapter

Adapter for Abilities API, letting WordPress abilities to be used as MCP tools, resources or prompts

74855.8k1](/packages/wordpress-mcp-adapter)[wp-graphql/wp-graphql-woocommerce

WooCommerce bindings for WPGraphQL

69146.8k](/packages/wp-graphql-wp-graphql-woocommerce)[sybrew/the-seo-framework

An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.

47078.8k](/packages/sybrew-the-seo-framework)[planetteamspeak/ts3-php-framework

Modern use-at-will framework that provides individual components to manage TeamSpeak 3 Server instances

21786.4k5](/packages/planetteamspeak-ts3-php-framework)

PHPackages © 2026

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