PHPackages                             hungnth/wordpress-package-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. hungnth/wordpress-package-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

hungnth/wordpress-package-parser
================================

A PHP package for parsing WordPress plugin, theme, and generic package metadata.

1.0.1(today)03↑2900%MITPHPPHP &gt;=7.4

Since Jun 18Pushed todayCompare

[ Source](https://github.com/HungNth/wordpress-package-parser)[ Packagist](https://packagist.org/packages/hungnth/wordpress-package-parser)[ Docs](https://github.com/HungNth/wordpress-package-parser)[ RSS](/packages/hungnth-wordpress-package-parser/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

WordPress Package Parser
========================

[](#wordpress-package-parser)

[![PHP](https://camo.githubusercontent.com/b295808b3713c4e4ce1a2907b8444a81b23dd22a8d3bcf92d4e299cd219bd3ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e342d3737376262343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/)[![Composer](https://camo.githubusercontent.com/45b6980d919752c4f47a16e50b9d94cb0d491f0b753f6ec0cf629c7cc3168810/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6d706f7365722d72656164792d3838353633303f7374796c653d666c61742d737175617265266c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465)](https://getcomposer.org/)[![Tests](https://camo.githubusercontent.com/522ce88fbc6aa7245834f915f3990f47496451703a2932b462272b533cc05e02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d504850556e69742d3665396631383f7374796c653d666c61742d737175617265)](https://phpunit.de/)

A small framework-agnostic PHP package for reading metadata from WordPress plugin, WordPress theme, and generic ZIP archives.

It extracts useful package data from plugin headers, theme `style.css` headers, and WordPress.org-style `readme.txt` files, then returns a normalized metadata array you can use in Laravel, plain PHP, package upload flows, or custom update systems.

Features
--------

[](#features)

- Parse WordPress plugin ZIP archives.
- Parse WordPress theme ZIP archives.
- Parse WordPress.org-style `readme.txt` metadata and sections.
- Convert readme sections to HTML with Parsedown.
- Detect generic ZIP archives and generate a stable slug from the uploaded filename.
- Use PHP `ZipArchive` when available, with a bundled PclZip fallback.
- Work without Laravel service providers, facades, or framework bootstrapping.

Requirements
------------

[](#requirements)

- PHP 7.4 or newer
- Composer

The package can use the PHP `zip` extension when available. If `ZipArchive` is not loaded, it falls back to the bundled PclZip implementation.

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

[](#installation)

```
composer require hungnth/wordpress-package-parser
```

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

[](#quick-start)

```
