testing-wp-runtime

द्वारा automattic

वर्डप्रेस प्लगइन और थीम को रनटाइम पर मान्य करने के लिए wp-now चलाने के दिशानिर्देश

npx skills add https://github.com/automattic/data-liberation-agent --skill testing-wp-runtime

When to use me

Use this skill when you need to verify that a WordPress plugin or theme loads correctly at runtime. Do not use this skill for static linting — use testing-php or testing-js for that.

Step 1: Determine the project mode

wp-now requires a --mode flag based on the project type:

  • Plugin project (main PHP file has a Plugin Name: header): use --mode=plugin
  • Theme project (contains style.css with Theme Name: header): use --mode=theme

Check the project root to determine which mode to use:

head -20 *.php style.css 2>/dev/null

Step 2: Start wp-now

Start wp-now in the background on an available port:

wp-now start --mode=<plugin|theme> --port=8881 &

Wait a few seconds for the server to initialize, then verify it is running:

curl -s -o /dev/null -w "%{http_code}" http://localhost:8881/
  • HTTP 200 or 302 = server is running and WordPress loaded successfully.
  • HTTP 500 = a fatal PHP error occurred — check debug log.
  • Connection refused = server failed to start.

Step 3: Check for PHP errors

After the server starts, check the WordPress debug log for errors:

find /tmp -name "debug.log" -path "*/wp-content/*" 2>/dev/null | head -1 | xargs tail -50 2>/dev/null

Look for:

  • Fatal errors: Plugin or theme could not load — must be fixed.
  • Warnings/Notices: Non-fatal but should be reported.
  • Deprecation notices: Report but do not fix.

Step 4: Validate HTTP responses

Test key endpoints to verify the project works:

# Homepage
curl -s -o /dev/null -w "%{http_code}" http://localhost:8881/

# wp-admin (should redirect to login)
curl -s -o /dev/null -w "%{http_code}" http://localhost:8881/wp-admin/

For plugins, also check if the plugin is active:

curl -s http://localhost:8881/ | grep -c "<plugin-specific-identifier>"

Step 5: Clean up

Always stop wp-now when done testing:

kill $(lsof -t -i:8881) 2>/dev/null

Rules

  • Always clean up: Never leave wp-now running after testing is complete.
  • Port 8881: Always use port 8881 to avoid conflicts.
  • Timeout: If wp-now does not respond within 15 seconds of starting, consider it failed and kill the process.
  • Never modify business logic: Only report issues found during runtime validation. Do not change how the code works.
  • Report format: After testing, report results as:
    • PASS: Server started, HTTP 200, no fatal errors in debug log
    • FAIL: List specific errors (HTTP status, debug log entries, failed endpoints)

automattic की और Skills

wp-phpstan
automattic
वर्डप्रेस प्रोजेक्ट्स (प्लगइन्स/थीम्स/साइट्स) में PHPStan स्टैटिक एनालिसिस को कॉन्फ़िगर करने, चलाने या ठीक करने के लिए उपयोग करें: phpstan.neon सेटअप, बेसलाइन्स,…
official
wp-playground
automattic
वर्डप्रेस प्लेग्राउंड वर्कफ़्लो के लिए उपयोग करें: ब्राउज़र में या स्थानीय रूप से @wp-playground/cli (सर्वर, रन-ब्लूप्रिंट, बिल्ड-स्नैपशॉट) के माध्यम से तेज़ डिस्पोज़ेबल WP इंस्टेंस,…
official
wp-plugin-development
automattic
वर्डप्रेस प्लगइन विकसित करते समय उपयोग करें: आर्किटेक्चर और हुक्स, सक्रियण/निष्क्रियण/अनइंस्टॉल, एडमिन यूआई और सेटिंग्स एपीआई, डेटा स्टोरेज, क्रॉन/कार्य, सुरक्षा…
official
wp-project-triage
automattic
जब आपको किसी वर्डप्रेस रिपॉजिटरी (प्लगइन/थीम/ब्लॉक थीम/WP कोर/गुटेनबर्ग/पूर्ण साइट) का निर्धारित निरीक्षण चाहिए, जिसमें टूलिंग/टेस्ट/संस्करण… शामिल हों।
official
wp-rest-api
automattic
वर्डप्रेस REST API एंडपॉइंट/रूट्स बनाने, विस्तारित करने या डीबग करने के लिए उपयोग करें: register_rest_route, WP_REST_Controller/कंट्रोलर क्लासेस, स्कीमा/आर्गुमेंट…
official
wp-wpcli-and-ops
automattic
WP-CLI (wp) के साथ WordPress संचालन के लिए उपयोग करें: सुरक्षित खोज-बदलाव, db निर्यात/आयात, प्लगइन/थीम/उपयोगकर्ता/सामग्री प्रबंधन, क्रॉन, कैश फ्लशिंग,…
official
wpds
automattic
जब वर्डप्रेस डिज़ाइन सिस्टम (WPDS) और इसके घटकों, टोकन, पैटर्न आदि का उपयोग करके यूआई बनाया जा रहा हो, तब उपयोग करें।
official
woocommerce-finalize
automattic
WooCommerce प्लगइन्स के लिए प्री-रिलीज़ कोड स्वास्थ्य और ट्रेसेबिलिटी ऑडिट। कोड समीक्षा के बाद चलता है -- मृत कोड, डुप्लिकेशन, संरचनात्मक जटिलता, और… पर ध्यान केंद्रित करता है।
official