PHPackages                             wpconstructor/scripts - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. wpconstructor/scripts

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

wpconstructor/scripts
=====================

WPConstructor Scripts: Composer-driven PHP scripts for building, backing up, and distributing WordPress plugins consistently and safely.

v0.2.0(1mo ago)098↓64.3%MITPHP

Since Apr 1Pushed 1mo agoCompare

[ Source](https://github.com/WPConstructor/scripts)[ Packagist](https://packagist.org/packages/wpconstructor/scripts)[ RSS](/packages/wpconstructor-scripts/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

WPConstructor Scripts
=====================

[](#wpconstructor-scripts)

 [![WPConstructor Scripts Logo](https://camo.githubusercontent.com/7a1cd43645d85880e7738e41b741c83cc45be2322cbc092f5f9575ebe0553187/68747470733a2f2f7770636f6e7374727563746f722e636f6d2f6173736574732f696d616765732f6c6f676f732f7770636f6e7374727563746f722d736372697074732e706e673f763d32)](https://camo.githubusercontent.com/7a1cd43645d85880e7738e41b741c83cc45be2322cbc092f5f9575ebe0553187/68747470733a2f2f7770636f6e7374727563746f722e636f6d2f6173736574732f696d616765732f6c6f676f732f7770636f6e7374727563746f722d736372697074732e706e673f763d32)

A collection of **Composer-driven PHP scripts** for building, backing up, and distributing WordPress plugins consistently and safely.

---

Why I Built WPConstructor Scripts
---------------------------------

[](#why-i-built-wpconstructor-scripts)

While building WordPress plugins, I kept repeating the same Composer scripts—copying assets, creating ZIPs, backing up files, and securing directories. It became repetitive and error-prone.

So I built WPConstructor Scripts: a reusable setup that handles all the common plugin build tasks in one place, instead of rewriting them every time.

---

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

[](#installation)

Install WPConstructor Scripts via Composer as a dev dependency:

```
composer require wpconstructor/scripts --dev
```

Then, add the following to your plugin’s `composer.json` under the `"scripts"` section:

```
"scripts": {
    "build": "php vendor/wpconstructor/scripts/bin/run-build.php",
    "cfp": "php vendor/wpconstructor/scripts/bin/cfp.php",
    "backup:plugin": "php vendor/wpconstructor/scripts/bin/backup-plugin.php",
    "backup: all-plugins": "php vendor/wpconstructor/scripts/bin/backup-all-plugins.php"
}
```

Create a `build-zip.manifest.json` file in the root of your plugin. The `base` value should match your plugin's slug (the root directory inside the ZIP). Use the `include` array to specify which files and directories should be packaged, and `add-index-php` to automatically create `index.php` files in the listed directories for additional directory protection.

Example:

```
{
    "base" : "wpcn-contact",
    "zip-file-name" : "wpcn-contact.zip",
    "include":[
        "/wpcn-contact.php",
        "/README.md",
        "/LICENSE.md",
        "/src/",
        "/docs/",
        "/assets/",
        "/vendor/wpconstructor/plugin-version/src/includes/plugin-version.php",
        "/vendor/autoload.php",
        "/vendor/composer/"
    ],
    "add-index-php":[
        "/"
    ]
}
```

---

Usage Examples
--------------

[](#usage-examples)

### Build &amp; Distribution

[](#build--distribution)

- **Build Plugin**

```
composer run build
```

Creates a distributable ZIP in `build/plugin-slug.zip`, as defined in `build-zip.manifest.json`.

---

### Maintenance Utilities

[](#maintenance-utilities)

- **Check File Permissions**

```
composer run cfp
```

Scans your WordPress installation for files without write permissions.

---

### Backup Scripts

[](#backup-scripts)

- **Backup Current Plugin**

```
composer run backup:plugin
```

Creates a backup of the current plugin in `wordpress-root/../plugin-backups`.

- **Backup All Plugins**

```
composer run backup:all-plugins
```

Backs up all plugins to `wordpress-root/../all-plugins-backup`.

---

Changelog
---------

[](#changelog)

v0.2.0 (July 4, 2026)

- Added support for build-zip.manifest.json, enabling configurable and structured plugin ZIP builds.

v0.1.0 (April 1, 2026)

- Initial version used for the WPConstructor Dashboard (now removed).

---

License
-------

[](#license)

MIT License © 2026 by WPConstructor

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance92

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~94 days

Total

2

Last Release

39d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/198608876?v=4)[WPConstructor](/maintainers/WPConstructor)[@WPConstructor](https://github.com/WPConstructor)

---

Top Contributors

[![WPConstructor](https://avatars.githubusercontent.com/u/198608876?v=4)](https://github.com/WPConstructor "WPConstructor (12 commits)")

---

Tags

automationbackupbuild-toolscomposerdeploymentplugin-developmentwordpress

### Embed Badge

![Health badge](/badges/wpconstructor-scripts/health.svg)

```
[![Health](https://phpackages.com/badges/wpconstructor-scripts/health.svg)](https://phpackages.com/packages/wpconstructor-scripts)
```

###  Alternatives

[laminas/laminas-server

Create Reflection-based RPC servers

2425.6M30](/packages/laminas-laminas-server)[pomander/pomander

Deployment for PHP

19615.7k2](/packages/pomander-pomander)[mwltr/magedeploy2-base

Magento2 Deployment Setup using Robo and Deployer

425.3k](/packages/mwltr-magedeploy2-base)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
