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.

087↓58.3%PHP

Since May 1Pushed 1mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#wpconstructor-scripts)

 [![WPConstructor Scripts Logo](https://camo.githubusercontent.com/ead311034502192904e4bc10b200462af7c1d4d40af8ee090ae7b76d0ecf823a/68747470733a2f2f7770636f6e7374727563746f722e636f6d2f6173736574732f696d616765732f7770636f6e7374727563746f722d736372697074732d6c6f676f2e706e673f763d32)](https://camo.githubusercontent.com/ead311034502192904e4bc10b200462af7c1d4d40af8ee090ae7b76d0ecf823a/68747470733a2f2f7770636f6e7374727563746f722e636f6d2f6173736574732f696d616765732f7770636f6e7374727563746f722d736372697074732d6c6f676f2e706e673f763d32)

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:update": "php vendor/wpconstructor/scripts/scripts/build-vendor.php && php vendor/wpconstructor/scripts bin/copy-assets.php && php vendor/wpconstructor/scripts/scripts/add-index-php.php && npx @wpconstructor minify-assets assets",
    "build": "php vendor/wpconstructor/scripts/bin/run-build.php",
    "cfp": "php vendor/wpconstructor/scripts/bin/cfp.php",
    "clean": "php vendor/wpconstructor/scripts/bin/clean.php",
    "backup:packages": "php vendor/wpconstructor/scripts/bin/backup-packages.php",
    "backup:plugin": "php vendor/wpconstructor/scripts/bin/backup-plugin.php",
    "backup:all-plugins": "php vendor/wpconstructor/scripts/bin/backup-all-plugins.php"
}
```

---

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

[](#usage-examples)

### Asset &amp; Security Helpers

[](#asset--security-helpers)

- **Build Update**

```
composer run build:update
```

Updates plugin assets to the correct directories, creating nested folders like:
`assets/wpconstructor/dashboard/images`.

- **Add Index Files (included in build)**
    Automatically adds `index.php` to all asset directories to prevent directory listing.

---

### Build &amp; Distribution

[](#build--distribution)

- **Build Plugin**

```
composer run build
```

Runs the full build process:

1. Copies vendor files to `build-vendor`
2. Removes empty directories
3. Adds `index.php` files to `assets`.
4. Creates a distributable ZIP in `build/plugin-name-version-date.zip` or set in `build-zip.manifest.json`.

- **Clean Project**

```
composer run clean
```

Removes empty directories and cleans build artifacts.

---

### 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`.

Optional:

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

- **Backup Packages Directory**

```
composer run backup:packages
```

Backs up the entire `packages` directory to `wordpress-root/../packages-backup`.

---

One Workflow, Everywhere
------------------------

[](#one-workflow-everywhere)

With WPConstructor Scripts, every plugin build looks the same:

1. Assets copied
2. Vendors trimmed
3. Empty directories removed
4. Index files added
5. ZIP created
6. Backups secured

No guessing. No half-forgotten steps. No copy-pasting scripts between repos.

---

License
-------

[](#license)

MIT License © 2026 by WPConstructor

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance59

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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.

### 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 (9 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

[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

192739.0k3](/packages/ryoluo-sail-ssl)[sarfraznawaz2005/servermonitor

Laravel package to periodically monitor the health of your server and website.

19613.5k1](/packages/sarfraznawaz2005-servermonitor)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4676.9k](/packages/tiamo-phpas2)[wapmorgan/php-rpm-packager

RPM packager for PHP applications.

106.5k](/packages/wapmorgan-php-rpm-packager)

PHPackages © 2026

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