ワンクリックで
processwire-system-update-cli
Upgrade modules and core files in ProcessWire projects through DDEV CLI
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Upgrade modules and core files in ProcessWire projects through DDEV CLI
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | processwire-system-update-cli |
| description | Upgrade modules and core files in ProcessWire projects through DDEV CLI |
| version | 5 |
Use when updating a DDEV-based ProcessWire project's modules and core through CLI automation.
Gate: ask the user which ProcessWire core target to use before doing anything else: master or dev. Do not update files or commit until the user chooses. Store this as $targetBranch.
Start by scanning for available updates before changing files. Use ProcessWireUpgradeCheck through ddev php:
getModuleVersions(true, true) to list outdated modules.getCoreBranches(false, true) to fetch all available core branches.Use the user's $targetBranch choice to select the relevant entry, e.g. $branches[$targetBranch], and use that selected version for compatibility checks and the final core ZIP.
Include a compatibility check in the initial scan. Inspect each update's requirements from ProcessWireUpgradeCheck/module-directory data (requiresVersions) and, when ZIP/source files are available, the module's public getModuleInfo() array requires property. Compare requirements against the current PHP_VERSION, current config()->version, and the selected target core branch/version.
Decide update order from compatibility results:
If the scan reports Pro/paid modules, stop and ask the user for local ZIP paths for each Pro module before proceeding. Do not assume the paths are the same across projects. Confirm the ZIPs exist and inspect their top-level folder/module names before installation.
Start DDEV and create a DB snapshot with ddev snapshot --name before-system-update-$(date +%Y%m%d%H%M%S).
Always update modules before ProcessWire core when compatibility allows it. Each module update must be committed separately with a conventional commit.
For module ZIPs, use wire/modules/Process/ProcessModule/ProcessModuleInstall.php and ProcessModuleInstall::unzipModule($tempZip, config()->paths->siteModules . $module . '/'), then modules()->refresh() and modules()->resetCache(). Copy paid ZIPs into a project/cache temp path first because unzipModule() deletes the ZIP it extracts.
For public modules, download the ZIP quietly into site/assets/cache/module-update-zips/, install via the same ProcessModuleInstall::unzipModule() flow, verify version with getModuleInfoVerbose(), then commit only that module directory.
After all modules report no outdated modules, update ProcessWire core from the user-selected branch ZIP, not a hardcoded branch. Replace wire/ from the extracted archive, update index.php when its PROCESSWIRE index version changes, update .htaccess only after reviewing diffs, and update composer.json package metadata if changed.
Verify via ddev php bootstrap: config()->version, module versions, selected target branch/version, and count($check->getModuleVersions(true,true)) === 0. Smoke test frontend and the admin URL from config()->urls->admin.
requires/requiresVersions says they need a newer ProcessWire core or PHP runtime. Warn about PHP requirements; suggest core-first only when a module update requires newer ProcessWire.unzipModule(); it deletes the ZIP after extraction and container PHP cannot see arbitrary host /home/... paths unless copied into the project.ProcessModuleInstall::downloadModuleFromUrl() requires $config->moduleInstall('download', ...) to be enabled, so the smoother CLI path is to download ZIPs quietly with shell/curl into site/assets/cache/module-update-zips/, then call ProcessModuleInstall::unzipModule() on that local project path.ddev php -r one-liners, avoid unescaped $variables in double-quoted shell strings; either single-quote the PHP code or escape $. Bash stripped $m once and caused a PHP parse error.modules()->getModuleInfo() may show stale/cached or raw numeric versions right after replacing files. Final working verification is: modules()->resetCache(); modules()->refresh(); modules()->getModuleInfoVerbose($module); modules()->formatVersion($info['version']).FieldtypeRepeaterMatrix installs InputfieldRepeaterMatrix, FieldtypeTable installs InputfieldTable, ProMailer installs ProcessProMailer), verify both parent and child module versions.ProcessWireUpgradeCheck is useful for detection only; ProcessWireUpgrade links module updates to the admin UI and is not the CLI installer. The final working CLI installer was ProcessModuleInstall::unzipModule() plus modules()->refresh().wire/core/*.php files into subdirectories, so a clean rsync -a --delete extracted/wire/ wire/ is preferable to copying over existing files without deletion.index.php and .htaccess diffs separately during core update. In this upgrade, index.php needed updating from PROCESSWIRE index 300 to 303; .htaccess had the same @htaccessVersion 301 but included a security-header comment/change, so it was intentionally copied after review./processwire/; read it with config()->urls->admin and smoke test that path.ddev snapshot list is wrong for this DDEV version; use ddev snapshot --list.master or dev), update availability, and compatibility status for PHP and ProcessWire requirements.git status --short --branch is clean after commits.ddev php reports expected ProcessWire and module versions.ProcessWireUpgradeCheck->getModuleVersions(true,true) returns zero items.config()->urls->admin return HTTP 200.Runs PHP scripts and one-liners via ddev in ProcessWire projects, bootstraps the PW API for CLI usage, debugs with TracyDebugger, creates Tracy console snippets, and executes direct database queries. Use when running PHP through ddev, writing ProcessWire CLI scripts, building Tracy debugger snippets, or querying the database in a ddev environment.
Provides ProcessWire CLI and migration workflows for sites using the AgentTools module. Use when querying the ProcessWire API, making repeatable site changes, or transferring changes across environments.
Stores and retrieves ProcessWire API patterns, gotchas, and conventions via memvid hybrid search. Use when starting PW tasks, hitting PW errors, or when user asks to remember/recall ProcessWire knowledge. Persistent cross-project memory at ~/.memvid/processwire.mv2
Guides the creation of a new ProcessWire agent skill from source material. Reads provided sources, proposes file structure and description, creates SKILL.md with reference files following best practices. Use when creating a new PW skill for this repository.
Verifies an existing ProcessWire agent skill for accuracy and best practices compliance against source material. Runs parallel checks per reference file, produces an issue table with severity levels, and applies only user-approved fixes. Use when verifying or auditing a PW skill in this repository.
Creates and manages ProcessWire schema migrations via RockMigrations — fields, templates, roles, permissions, pages, and modules. Supports config migrations, direct API methods, MagicPages, and PageClass lifecycle hooks (onCreate, onAdded, onSaved). Use when creating or modifying fields, templates, roles, permissions, running migrations, setting up access control, or working with MagicPage and PageClass hooks in ProcessWire.