Download the PHP package justinholtweb/craft-nuke without Composer

On this page you can find all versions of the php package justinholtweb/craft-nuke. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-nuke

Nuke

Delete content in bulk, and keep the site clean afterwards.

Nuke does two related jobs for Craft 5. A strike deletes a deliberately chosen set of content — a section, a volume, a user group — together with its drafts, revisions and relations. A sweep is the recurring housekeeping pass: unreferenced assets, orphaned rows, expired backups and logs, temp files, and Craft's own garbage collection.

Both are built around the same idea: nothing is deleted until you have seen exactly what would be.

The guardrails

A plugin that deletes things in bulk should arrive configured to hesitate.

What a strike can target

Entries, categories, tags, assets and users. Each narrowed by source (section, volume, group), entry type, site, status, age, search, or an explicit list of IDs.

Entries and assets can also be narrowed by author — the entries someone is an author of, the assets they uploaded. That includes suspended and inactive users, and users who have been removed but are still in Craft's trash: soft-deleting a user leaves their authorship on record until garbage collection deletes the account for good, so there is a window in which "everything this person wrote" can still be found. The preview says when that window closes, and counts entries that have other authors too, since deleting those takes the other authors' work with them.

Other element types can register themselves through Scopes::EVENT_REGISTER_SCOPES — see docs/EXTENDING.md.

Deleting an element takes its drafts and revisions with it either way; Nuke counts them so the numbers in the report are the truth, and can optionally remove them outright rather than leaving them soft-deleted.

What a sweep cleans up

Twenty-three tasks, each with its own window, each opted out of individually.

Content — trashed elements past your own window; abandoned and autosave drafts; revisions beyond the newest few per element (Craft only applies maxRevisions when an element is saved, so lowering it never catches up with content nobody edits); unreferenced assets; empty asset folders.

Database — relations pointing at deleted elements; stale search index rows; draft change tracking; element activity; deprecation warnings; failed queue jobs; stale login sessions; expired tokens; announcements; asset-indexing leftovers; orphaned transform records; bulk-operation records.

Files — old database backups; rotated logs; temp and scratch files; compiled templates; config and Composer backups.

Craft — Craft's own garbage collector, run last so it picks up everything the rest orphaned.

The unreferenced-assets task is the one that cannot be certain, and it is built around that fact: it checks relations and reference tags in element content, it reports rather than deletes by default, and the strongest thing it will ever do is move an asset to the trash.

Editions

Lite is everything above: strikes with the full preview and every guardrail, manual sweeps, the run ledger, permissions, and the console commands.

Pro adds scheduled sweeps and emailed reports.

From the console

--dry-run defaults to on everywhere in the console. A command that deletes by default is a command that deletes when someone runs it to see what the arguments are.

For cron, either let cron own the schedule:

…or let Nuke own it and have cron just ask (Pro):

Permissions

Permission What it allows
nuke:view The dashboard, previews and the run ledger
nuke:sweep Running housekeeping sweeps
nuke:strike Deleting content
nuke:hardDelete Bypassing the trash

nuke:view deliberately does not include nuke:strike. Seeing what a deletion would do is a reasonable thing to grant widely; doing it is not.

Requirements

Craft CMS 5.3 or later, PHP 8.2 or later. No runtime dependencies beyond Craft.

Installation

Extending

Custom scopes, custom sweepers, and events around both — docs/EXTENDING.md.

Licence

The Craft License. See LICENSE.md.


All versions of craft-nuke with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
craftcms/cms Version ^5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package justinholtweb/craft-nuke contains the following files

Loading the files please wait ...