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

wporg-replace-helper

v1.0.1

Published

A set of scripts that help with replacing version numbers and other text for a WordPress.org plugin.

Readme

wporg-replace-helper

A set of scripts that help with replacing version numbers and other text for a WordPress.org plugin.

How it works

You must provide at least a plugin_version, tested_wp_version, minimum_wp_version, or minimum_php_version in order for the to do anything.

It will automatically replace the corresponding value in your plugin file, readme.txt, and package.json (if you use one for your project).

The underlying logic of the action uses the corresponding NPM package scripts here: https://github.com/sc0ttkclark/wporg-replace-helper -- This may be useful for your project if you want to run the replacements locally instead of through a GitHub action.

Running the action

  1. Go to your GitHub repository
  2. Go to Actions
  3. Choose {Your action name}
  4. Press "Run workflow"
  5. Fill out the version number(s) you want to change
  6. Hit submit

The version number(s) will be changed on any file(s) supported but that's only within the action run itself. You will still need the ability to commit the files changed (see Example action below).

Available options

Required options

  • plugin_file: The plugin file name like - your-plugin.php
  • plugin_path: The plugin path which should in most cases be - ${{ github.workspace }}

At least one of these options must be provided

  • plugin_version: The plugin version.
  • tested_wp_version: The Tested up to WP version.
  • minimum_wp_version: The Minimum WP version.
  • minimum_php_version: The Minimum PHP version.

Additional options

  • plugin_version_constant_name: The plugin constant name (if applicable).
  • tested_wp_version_constant_name: The Tested up to WP version constant name (if applicable).
  • minimum_wp_version_constant_name: The Minimum WP version constant name (if applicable).
  • minimum_php_version_constant_name: The Minimum PHP version constant name (if applicable).

Example step

      - name: Run wporg-replace
        uses: sc0ttkclark/[email protected]
        with:
          plugin_file: ${{ env.WPORG_PLUGIN_FILE }}
          plugin_path: ${{ github.workspace }}
          plugin_version: ${{ github.event.inputs.plugin_version }}
          tested_wp_version: ${{ github.event.inputs.tested_wp_version }}
          minimum_wp_version: ${{ github.event.inputs.minimum_wp_version }}
          minimum_php_version: ${{ github.event.inputs.minimum_php_version }}

Example simple action

This action allows inputs for workflow dispatch so that it can be manually run. After the strings are replaced, an auto-commit step will ensure those changes are comitted back to the branch chosen.

name: WordPress.org Replace Strings
env:
  WPORG_PLUGIN_FILE: 'your-plugin.php'
on:
  workflow_dispatch:
    inputs:
      plugin_version:
        description: 'Plugin version'
        required: false
      tested_wp_version:
        description: 'Tested up to WP version'
        required: false
      minimum_wp_version:
        description: 'Minimum WP version'
        required: false
      minimum_php_version:
        description: 'Minimum PHP version'
        required: false
jobs:
  wporg_replace:
    runs-on: ubuntu-latest
    steps:
      - name: What are we doing?
        run: |
          echo plugin_version: ${{ github.event.inputs.plugin_version }}
          echo tested_wp_version: ${{ github.event.inputs.tested_wp_version }}
          echo minimum_wp_version: ${{ github.event.inputs.minimum_wp_version }}
          echo minimum_php_version: ${{ github.event.inputs.minimum_php_version }}
      - name: Checkout the code
        uses: actions/checkout@v4
      - name: Run wporg-replace
        uses: sc0ttkclark/[email protected]
        with:
          plugin_file: ${{ env.WPORG_PLUGIN_FILE }}
          plugin_path: ${{ github.workspace }}
          plugin_version: ${{ github.event.inputs.plugin_version }}
          tested_wp_version: ${{ github.event.inputs.tested_wp_version }}
          minimum_wp_version: ${{ github.event.inputs.minimum_wp_version }}
          minimum_php_version: ${{ github.event.inputs.minimum_php_version }}
      - name: Commit changes
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          file_pattern: ${{ env.WPORG_PLUGIN_FILE }} readme.txt package.json
          commit_message: Update wporg version(s)
      - name: "Run if changes have been detected"
        if: steps.auto-commit-action.outputs.changes_detected == 'true'
        run: echo "Changes!"
      - name: "Run if no changes have been detected"
        if: steps.auto-commit-action.outputs.changes_detected == 'false'
        run: echo "No Changes!"

Example full action

This example shows ALL of the options utilized, but you may only need to provide the plugin file name on your project.

name: WordPress.org Replace Strings
env:
  WPORG_PLUGIN_FILE: 'your-plugin.php'
  WPORG_PLUGIN_VERSION_CONSTANT_NAME: 'YOUR_PLUGIN_VERSION'
  WPORG_MINIMUM_WP_VERSION_CONSTANT_NAME: 'YOUR_PLUGIN_MINIMUM_WP_VERSION'
  WPORG_MINIMUM_PHP_VERSION_CONSTANT_NAME: 'YOUR_PLUGIN_MINIMUM_PHP_VERSION'
  WPORG_TESTED_WP_VERSION_CONSTANT_NAME: 'YOUR_PLUGIN_TESTED_WP_VERSION'
on:
  workflow_dispatch:
    inputs:
      plugin_version:
        description: 'Plugin version'
        required: false
      tested_wp_version:
        description: 'Tested up to WP version'
        required: false
      minimum_wp_version:
        description: 'Minimum WP version'
        required: false
      minimum_php_version:
        description: 'Minimum PHP version'
        required: false
jobs:
  wporg_replace:
    runs-on: ubuntu-latest
    steps:
      - name: What are we doing?
        run: |
          echo plugin_version: ${{ github.event.inputs.plugin_version }}
          echo tested_wp_version: ${{ github.event.inputs.tested_wp_version }}
          echo minimum_wp_version: ${{ github.event.inputs.minimum_wp_version }}
          echo minimum_php_version: ${{ github.event.inputs.minimum_php_version }}
      - name: Checkout the code
        uses: actions/checkout@v4
      - name: Run wporg-replace
        uses: sc0ttkclark/[email protected]
        with:
          plugin_file: ${{ env.WPORG_PLUGIN_FILE }}
          plugin_path: ${{ github.workspace }}
          plugin_version: ${{ github.event.inputs.plugin_version }}
          tested_wp_version: ${{ github.event.inputs.tested_wp_version }}
          minimum_wp_version: ${{ github.event.inputs.minimum_wp_version }}
          minimum_php_version: ${{ github.event.inputs.minimum_php_version }}
          plugin_version_constant_name: ${{ env.WPORG_PLUGIN_VERSION_CONSTANT_NAME }}
          tested_wp_version_constant_name: ${{ env.WPORG_TESTED_WP_VERSION_CONSTANT_NAME }}
          minimum_wp_version_constant_name: ${{ env.WPORG_MINIMUM_WP_VERSION_CONSTANT_NAME }}
          minimum_php_version_constant_name: ${{ env.WPORG_MINIMUM_PHP_VERSION_CONSTANT_NAME }}
      - name: Commit changes
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          file_pattern: ${{ env.WPORG_PLUGIN_FILE }} readme.txt package.json
          commit_message: Update wporg version(s)
      - name: "Run if changes have been detected"
        if: steps.auto-commit-action.outputs.changes_detected == 'true'
        run: echo "Changes!"
      - name: "Run if no changes have been detected"
        if: steps.auto-commit-action.outputs.changes_detected == 'false'
        run: echo "No Changes!"