wordpress-mobile / wordpress-mobile/WordPress-iOS

Self-hosted login: "Cannot load the WordPress site details" on plain-permalink sites; error surfaces no underlying reason

Open
#25,604 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug iOS JPOP Issue Login
Dominant language
Swift
Stars
3.9k
Forks
1.2k
Avg merge
23h 51m
Merged PRs (30d)
58

Description

Description

Summary

Adding a self-hosted site that uses plain permalinks fails with "Cannot load the WordPress site details" (WordPress/Classes/Login/SelfHostedSiteAuthenticator.swift). An Application Password is successfully issued (it appears in wp-admin → Users → Profile), but the app cannot load site details.

Root cause

The underlying login client (WordPressLoginClient, from Automattic/wordpress-rs) does not handle the ?rest_route= REST API root that WordPress advertises on plain-permalink sites — it path-extends that root into URLs that resolve to the API index. Full analysis + one-line curl reproduction: Automattic/wordpress-rs#1366
Secondary — diagnostics/UX

"Cannot load the WordPress site details" exposes none of the underlying reason. wordpress-rs already models richer failures (e.g. parse_api_root_failure_reason_wordfence_blocking_access); this case yields a silent parse failure with no actionable text. Surfacing the underlying WpLoginError/parse_api_root reason — and, where detectable, hinting at permalink / REST-route configuration — would save real support effort. The current self-hosted troubleshooting guide steers users toward host/firewall/Jetpack causes, which misattributes this bug.

Workaround

See Automattic/wordpress-rs#1366 — server-side rest_url filter + .htaccess rewrite, or enable pretty permalinks.

General Note

I am not a PHP developer or familiar with the low level WordPress code. The above was determined by debugging my system with Claude Code after updating to WordPress 7.0 for my WordPress instance.

Step-by-step reproduction instructions
  1. Self-hosted site, Settings → Permalinks = Plain.
  2. App → add self-hosted site → enter URL → authorize the Application Password.
  3. App shows "Cannot load the WordPress site details."
Screenshots, screen recording, code snippet

No response

Environment info
  • Surfaced via WordPress iOS 26.8 on iOS 26.5 on iPad Air (5th Generation)
  • Server Apache/PHP 8.3.30, WordPress 7.0, plain permalinks
Please confirm that you have searched existing issues in the repo.
  • Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in WordPress/Classes/Login/SelfHostedSiteAuthenticator.swift and trace how WordPressLoginClient handles the REST API root for plain-permalink sites; compare the behavior with wordpress-rs#1366. Reproduce the login flow using the issue's plain-permalink steps, then verify that the app supports the advertised route and surfaces an actionable underlying failure reason instead of only the generic message.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, rust, swift
Domain
api, authentication, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.