npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wpress-extract2

v1.0.8

Published

A simple CLI tool for extracting .wpress archive files generated by the All-in-one-Wp-Migration Wordpress plugin.

Readme

wpress-extract2

License: MIT npm version

A simple command-line interface (CLI) tool for extracting .wpress archive files generated by the All-in-One WP Migration WordPress plugin.

This is an improved version of the original wpress-extract project, which can be found at https://github.com/ofhouse/wpress-extract.

Improvements Over Original wpress-extract

Here's a summary of the key improvements made in wpress-extract2 and their impact:

| Improvement | Description | Impact | | :----------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- | | Enhanced Error Handling | Added more robust error handling throughout the extraction process, including specific error handling for file writing operations and stream errors. | Improved stability and reliability. Users get more informative error messages, making it easier to diagnose and resolve issues. | | Optimized Buffer Management | Replaced per-call buffer allocation in readHeader with a single reusable buffer. | Reduced memory allocation overhead, leading to slightly better performance, especially when extracting archives with many files. | | Stream-Based File Writing | Refactored readBlockToFile to use streams for writing output files instead of reading entire files into memory. | Significantly reduced memory usage when extracting large files, preventing potential out-of-memory errors. | | Optimized Directory Creation | Implemented caching for created directories in readBlockToFile to avoid redundant ensureDir calls. | Minor performance improvement, especially for archives with many files in the same directory structure. | | Simplified readFromBuffer | Optimized readFromBuffer function to reduce unnecessary buffer slicing operations. | Minor performance improvement when reading data from the archive. | | Improved CLI and Progress Bar | Enhanced the CLI with better output formatting, more informative error messages, cursor hiding during progress, and improved behavior of the progress bar. | Improved user experience with a more polished and responsive command-line interface. | | Updated Dependencies | Updated project dependencies (cli-progress, fs-extra, yargs) to their latest versions. | Benefits from bug fixes, performance improvements, and potential security patches in the updated dependencies. | | Code Style and Maintainability | Improved code readability and maintainability through consistent naming, better comments, use of constants, and function decomposition. Code formatting with prettier and linting with eslint | Makes it easier for developers to understand, contribute to, and maintain the codebase. |

Features

  • Extracts files and directories from .wpress archives.
  • Provides progress updates during extraction.
  • Handles large files efficiently using streams.
  • Option to override an existing output directory.
  • User friendly CLI interface

Installation

Now available on npm! Install it globally using:

npm install -g wpress-extract2

Or, install it locally in your project:

npm install wpress-extract2 --save-dev

Usage

wpress-extract2 <input.wpress> [options]

Arguments:

  • <input.wpress>: (Required) Path to the .wpress archive file you want to extract.

Options:

  • -o, --out <directory>: Specify the output directory where the contents of the archive will be extracted. If not specified, a directory with the same name as the input file (without the .wpress extension) will be created in the same directory as the input file.
  • -f, --force: Override the output directory if it already exists. Use with caution!
  • -h, --help: Display help information.

Examples:

  • Extract backup.wpress to a new directory named backup:
wpress-extract2 backup.wpress
  • Extract my-site.wpress to a specific directory /path/to/output:
wpress-extract2 my-site.wpress -o /path/to/output
  • Extract data.wpress to an existing directory my-data and override its contents:
wpress-extract2 data.wpress -o my-data -f

Progress Display

The tool displays a progress bar during the extraction process:

Extracting content to: relative/path/to/output/
Progress: [==============================] 100%

Error Handling

If any errors occur during the extraction process, the tool will display an error message and stop the progress bar. For example:

Progress: [====================>-------------] 58%
Error: Output dir is not empty. Clear it first or use the --force option to override it.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests to the repository: https://github.com/ProgrammerNomad/wpress-extract2

Contributors

License

This project is licensed under the MIT License - see the LICENSE file for details.

Notes

  • This tool is not affiliated with or endorsed by ServMask (the creators of All-in-One WP Migration).
  • It is recommended to back up any existing data before using the -f (force) option.

Development

Getting Started

  1. Clone the repository:
git clone [https://github.com/ProgrammerNomad/wpress-extract2](https://github.com/ProgrammerNomad/wpress-extract2)
  1. Install dependencies:
npm install

Scripts

  • npm start: Run the CLI tool with the provided arguments.
  • npm run lint: Run ESLint to check for code style issues.
  • npm run format: Run Prettier to automatically format the code.
  • npm test: Run tests (currently, there are no tests specified).

Building from Source

If you want to build the executable from the source:

  1. Make sure you have Node.js and npm installed.
  2. Clone this repository.
  3. Install dependencies: npm install
  4. Run the CLI directly using Node.js: node cli.js <input.wpress> [options]