Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

WPDumpSupportPHP

This is a simple library that loading wpdump's output in php.

Usage

require_once"vendor/autoload.php";
useWPDumpSupport\WPDump;
// Initialize WPDump with the JSON directory and cache directory.$wpDump = newWPDump(['jsonDir' => '/path/to/wp-json/save/dir', 'cacheDir' => '/path/to/cache/dir']);
// Load reference data (tags, categories, users, etc.) into memory for quick access.// This is necessary to resolve references from posts or pages.$wpDump->load();
// Stream posts one by one to avoid memory exhaustion with large datasets.foreach ($wpDump->streamPosts() as$post) {
// Process each post object.// Author and other references are resolved.echo"Post Title: " . $post->title . "\n";
if ($post->author) {
echo"Author Name: " . $post->author->name . "\n";
}
}

Documentation

For more detailed information on the architecture and internal workings of this library, please see the internal documentation.

Installation

$ composer install --no-dev

See

https://github.com/ryer/wpdump

License

MIT

Author

ryer (@ryer)

About

This is a simple library that loading wpdump's output in php.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages