Install & plan
The workflow for your rebuild.
Give your developer or AI coding agent the migrating-php-apps skill. It provides instructions, reference code and tools to inventory the application, rebuild the agreed features and validate the result.
Install the skill. Start with the plan.
Install with the command, or download the ZIP for manual setup.
What’s in the download
- An inventory script to help map the application
- Export and import tools for controlled migration batches
- A Motoko backend example to inspect
- Old-link handling, .php URLs included
- Platform notes for WordPress, Drupal, Joomla, Magento, Laravel and Symfony
- Dynamic delivery and response-verification choices
- The core workflow and validation checks
1. Install the migration skill
Run from your PHP project folder, then select your coding agent.
npx skills add JoshDFN/php-to-motoko-skill
3. Paste into your coding agent
Use the migrating-php-apps skill at https://www.phptomotoko.com/skills/migrating-php-apps/SKILL.md. Start with a read-only inventory of this PHP application. Plan a Motoko backend on the Internet Computer, with the frontend on ICP. Map the features, data, access rules and integrations to preserve. Propose phases, acceptance checks, rollback, costs and open questions. Load relevant ICP guidance as needed. Do not modify the application or deploy until I approve the plan.
Inspect a PHP → Motoko code example
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
http_response_code(401);
exit;
}
$pdo = new PDO($dsn, $dbUser, $dbPass);
$stmt = $pdo->prepare(
'REPLACE INTO notes (user_id, body) VALUES (?, ?)'
);
$stmt->execute([$_SESSION['user_id'], $_POST['body']]);
import Map "mo:core/Map";
import Principal "mo:core/Principal";
persistent actor Notes {
type Saved = { #saved; #signInFirst };
let notes = Map.empty<Principal, Text>();
public shared ({ caller }) func save(body : Text) : async Saved {
if (caller.isAnonymous()) return #signInFirst;
notes.add(caller, body);
#saved
};
};
caller comes from the request’s signature, not a session cookie, and notes persists without a database. This is an illustrative authenticated write; a production design needs application-specific validation.