Integrations
Map a WordPress website's routes
The agentproof-route-map plugin lists your WordPress website's routes, REST routes and AJAX actions for the live Defense Agent's route lock.
On a WordPress website, the live Defense Agent runs as a proxy in front of WordPress (see Live Defense Agent), and the route lock keeps visitors to the routes they use. No visitor needs /wp-admin/, wp-login.php or xmlrpc.php, so they stay locked unless you open them.
The route lock works on WordPress without a plugin: Map routes reads your pages, your sitemap and the REST routes WordPress lists at /wp-json/. The agentproof-route-map plugin adds what only WordPress itself knows: every REST route with its methods, and the AJAX actions your plugins answer.
Install the plugin
The plugin comes with @isagentproof/live. Copy it into your plugins folder and turn it on:
npx @isagentproof/live copy wordpress wp-content/plugins/agentproof-route-map
wp plugin activate agentproof-route-mapIt needs WordPress 6.0 or later and WP-CLI.
Map the routes when the container starts
Write the map, then start the proxy with it:
wp agentproof routes > /var/www/agentproof-routes.json
AGENTPROOF_LIVE_KEY=apl_... AGENTPROOF_LIVE_ROUTES=/var/www/agentproof-routes.json \
npx @isagentproof/live proxy --listen 8080 --to http://127.0.0.1:80The proxy sends the map to AgentProof, where it joins the crawl's results on the Live page. Run wp agentproof routes again after you add or remove plugins.
What the map lists
- Every REST route, with the methods WordPress answers. Whether visitors may use one depends on whether your pages call it: routes your pages never call stay locked.
- The AJAX actions plugins answer at
/wp-admin/admin-ajax.phpand/wp-admin/admin-post.php. Other actions there get a 404. WordPress adds some actions only while it answers an AJAX request, so the plugin also keeps the names of the actions it sees during real AJAX requests and lists them too. - WooCommerce's
wc-ajaxactions, and itswc-apiendpoints (open to callers that send a signature header). - What every WordPress website needs:
/wp-content/,/wp-includes/, the scripts, styles and images under/wp-admin/that public pages load, the sitemap, feeds and comment posting.wp-cron.phpanswers only requests from private and loopback addresses. - What no visitor needs, locked:
/wp-admin/,wp-login.php,xmlrpc.php, the users, settings, plugins and themes REST routes, and files such asreadme.html,license.txtandwp-load.php.
The map holds paths and methods only. The route lock also checks ?rest_route= and /index.php/ addresses as the routes they open, so they cannot get around a locked REST route.
Membership websites and shops where visitors sign in need wp-login.php. Open it with Open on the Route map card.
Run it without AgentProof
Without an install key, set AGENTPROOF_LIVE_ROUTE_LOCK=monitor or enforce and the proxy runs the route lock on the map alone. See Send your app's routes.
Last updated