Collection of various tools for parsing and performing DML operations on a WordPress database
Find a file
Victor Westerlund 6d1fa852b5 fix: import Database from scaffolding lib and remove instances from .env.ini (#1)
This PR fixes instancing issues with `Database` due to not being able to locate its parent class from the scaffolding library. This is definitely kind of strange and should probably be investigated further. It might be because we're not autoloading these files from the library itself.

We also remove loading of Database credentials from `.env.ini` as that does not make any sense for a bundled library. Database credentials are now provided to the constructor of the `Database` class.

Reviewed-on: https://codeberg.org/vlw/wp/pulls/1
2026-02-12 15:27:00 +01:00
src fix: import Database from scaffolding lib and remove instances from .env.ini (#1) 2026-02-12 15:27:00 +01:00
.gitignore fix: import Database from scaffolding lib and remove instances from .env.ini (#1) 2026-02-12 15:27:00 +01:00
composer.json initial commit 2026-02-12 13:19:50 +01:00
composer.lock initial commit 2026-02-12 13:19:50 +01:00
LICENSE initial commit 2026-02-12 13:19:50 +01:00
README.md initial commit 2026-02-12 13:19:50 +01:00

This library is a collection of various tools for parsing and performing DML operations on a WordPress database and its content. It is meant to be used as a stand-alone library and does not require WordPress to be installed.

Installation

composer require vlw/wp

How to use

A variety of tools are available, refer to the documentation for each tool to see its usage instructions.

For example:

use vlw\WP\Posts\Post;

// Retrieve a new Post instance for post ID 1234
$post = new Post(1234);

// Retrieve the content for this post
$post->post_content;
// Update the datetime modified for this post
$post->post_modified = new DateTimeImmutable();