This function scans for WordPress® instances installed on a cPanel account. The system will populate cPanel's WordPress Manager interface with any newly discovered instances.
Note:
You must install the WordPress Manager cPanel plugin to access this API function.
This function uses the following SSE events:
register — The scan operation discovered a WordPress instance and registered it. The data is a
JSON-encoded object containing the attributes of the instance, with the same format used in the
UAPI get_instances and UAPI get_instance_by_id functions.found — The scan operation found a WordPress instance. If the WordPress instance is newly
discovered, the system will also generate a register event for the instance. The data is a
JSON-encoded object containing the following:path — The absolute file path to the instance.done — The scan is finished. The data is a JSON-encoded object that contains:found — An array of strings that represents the absolute path to the discovered instances and
any instances that the system already registered.converted — An array of converted instances that the system returns in the same format
provided in the UAPI get_instances and UAPI get_instance_by_id functions.terminated — The system or user terminated the scan. timedout — The scan timed out before it completed.register-failed — The system failed to build the instance registry. The data is a JSON-encoded
string that contains the error message.register-load-failed — The system could not load the registry after building the instance
registry. The data is a JSON-encoded string that contains the error message.For more information about server sent events, read Mozilla's Using server-sent events documentation.
uapi --output=jsonpretty \ --user=username \ WordPressInstanceManager \ start_scan
{- "apiversion": 3,
- "func": "start_scan",
- "module": "WordPressInstanceManager",
- "result": {
- "data": {
- "guid": "B3A27B96-51F7-11E8-92E3-CC90C4F823F0",
- "log": "/home/example/.cpanel/plugins/wordpress/scans/B3A27B96-51F7-11E8-92E3-CC90C4F823F0",
- "sse_url": "/sse/WordPressScan/B3A27B96-51F7-11E8-92E3-CC90C4F823F0"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}