Using the built-in PHP server on my machine, my local install of Wordpress runs fine, with pretty permalinks and all that. But some pages return 404’s – the PHP one with the purple header.

For example, the oembed stuff like /wp-json/oembed/1.0/embed?url=… all return 404’s.

I also get a 404 when I click a category in the admin, but there is something particularly strange about that: locally, that link is /wordpress/wp-admin/http_referer=/wordpress/wp-admin/edit-tags.php?taxonomy=category&post_type=episodes.

But on my remote install, that category links to /wordpress/wp-admin/term.php?taxonomy=category&tag_ID=11&post_type=episodes&wp_http_referer=%2Fwordpress%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dcategory%26post_type%3Depisodes.

When I use that URL locally (with the correct ID) it works without a hitch. So maybe the referer thing is messing things up? I'm at a loss…

  • I guess you'll have to debug or trace out how that URL is being constructed. I'd guess this is a substring somewhere that's expecting to have a full URL https://example.com/wordpress/wp-admin/ etc. and for some reason the PHP local server is only giving it a shorter relative URL and so the substring cuts out the wrong part of the string because it computed the indices to use from the wrong thing, or something like that. But I wouldn't know where to look for that. – Rup Nov 2 '20 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.