Custom REST API prefix and slug-renamed admin

2 min readUpdated 2026-05-28

Custom REST API prefix and slug-renamed admin

WordPress lets you change the REST API base path away from the default /wp-json/. A handful of “hide WordPress” plugins also rename wp-admin to a custom slug. Both break Hubbee’s default assumptions — but the fix is simple: tell Hubbee the actual prefix.

How to recognise the problem

The diagnostic reports rest_api_blocked or unreachable, and curl https://your-site.com/wp-json/ returns HTML (the WordPress homepage) instead of JSON. That means the REST API has been remapped.

Which plugins do this

  • WPS Hide Login — renames the login slug, optionally the entire admin area
  • Hide My WP Ghost — renames /wp-admin/, /wp-content/, and can rewrite the REST path
  • iThemes Hide Backend (in Solid Security) — renames the admin slug
  • All In One WP Security → Brute Force → Rename Login URL — login slug only
  • Custom rest_url_prefix filter in functions.php or in a custom mu-plugin

Confirm the actual prefix

In your WP-Admin → Settings → Permalinks, scroll to the bottom — if a plugin remapped the REST API, the page usually shows the new prefix. Otherwise, find it in code:

// wp-config.php or functions.php
add_filter('rest_url_prefix', function() {
  return 'my-api'; // your custom prefix
});

Or test by URL:

curl -i https://your-site.com/my-api/ | head -5
# Expect: HTTP/1.1 200 OK with a JSON body

The first path segment that returns JSON is your prefix.

Tell Hubbee about the custom prefix

In the Add Site dialog, enable Advanced → Custom REST prefix and enter the prefix without leading or trailing slashes:

my-api

Hubbee will hit https://your-site.com/my-api/bz/v1/* instead of /wp-json/bz/v1/* for all subsequent calls. Already-connected sites can be updated under Site → Settings → Connection → REST prefix.

Hide My WP Ghost — special note

Hide My WP Ghost can rewrite REST paths in two layers:

  1. Frontend rewrite (visible in the browser) — handled by the prefix setting above
  2. Backend rewrite (the actual WordPress route registration) — depends on the plugin’s Mapping mode

If Hubbee still fails after entering the prefix:

  • Hide My WP → Settings → Tweaks
  • Set REST API Mapping to Full (not “Show old REST too”)
  • This ensures the plugin generates routes under the new prefix and Hubbee can call them consistently

Some Hide My WP versions also block path probing. Whitelist Hubbee under Hide My WP → Permissions → Whitelist IPs using the Hubbee IP set from the privacy policy.

Multisite networks

In a subdirectory multisite (example.com/site1/), the REST endpoint for each subsite is:

https://example.com/site1/wp-json/bz/v1/*

Hubbee handles this automatically — connect each subsite separately, no prefix change needed.

In a subdomain multisite (site1.example.com), each subdomain has its own REST root at /wp-json/. Same — connect each subdomain as its own Hubbee site.

Connecting from the dashboard once corrected

After updating the REST prefix in Hubbee:

  1. Click Save in the connection dialog or settings card
  2. Wait ~30 seconds for the next heartbeat
  3. Site status flips from connection_error to online once a successful heartbeat lands

If still failing, run Site → Run diagnostic — the probe now uses the corrected prefix and tells you exactly which downstream check is still failing.

Was this article helpful?

Still stuck?

Open a support thread and we'll get back to you. Most replies arrive within a few hours on business days.

Contact support