Support » Fixing WordPress » Where is wp-json?

  • tricericci

    (@tricericci)


    On a fresh install of WordPress 5.2.4 (which I’ve tried twice), whenever I try to create a new page I get a ‘Publishing failed’ error and the following in the logs

    2019/10/22 11:44:36 [error] 21135#21135: *130 open() “/var/www/trisect.uk/web/wp-json/wp/v2/pages/54/autosaves” failed (2: No such file or directory), client: 2a02:8010:d004:0:b4f8:e0a1:9da9:db6f, server: trisect.uk, request: “POST /wp-json/wp/v2/pages/54/autosaves?_locale=user HTTP/2.0”, host: “trisect.uk”, referrer: “https://trisect.uk/wp-admin/post.php?post=54&action=edit”

    There’s no wp-json directory in the download (tried it twice) so I don’t know if I’m supposed to create it or what. I read somewhere about pretty permalinks needing to be set and I’ve done this.

    Thanks for looking

Viewing 7 replies - 1 through 7 (of 7 total)
  • Joy

    (@joyously)

    wp-json is the REST API for your site. It is a virtual address.
    Do you have a plugin that disables the REST API? Are you trying to edit a custom post type that does not specify the REST API use?
    You can take a look at Tools > Site Health to see what it says about the way your site is configured.

    tricericci

    (@tricericci)

    This is a clean WP install, the only plugin I have running is Akismet. All I’m doing is trying to create a new page on my blog

    tricericci

    (@tricericci)

    After checking Tools > Site health, an optional PHP module is missing and the REST API gave a 404 error.

    Weirdly though, I’ve lost the configuration lines in wp-config.php which enable multiple blogs (I REALLY don’t know how that happened). Going to tear the whole thing down and start from scratch again, I’ll repost an update (probably in a few days)

    tricericci

    (@tricericci)

    Clean install with clean database, cleared up a few minor issues under Tools > Site health, but REST API still gives 404 Not Found error

    Please try changing your parmalink to “Post Name”. WP Rest API doesn’t play well with “Custom Structure” 🙂

    I’ve got same error.
    Publishing failed. Error message: The response is not a valid JSON response.

    my permalin is on post name.

    also this error:
    wp-json No such file or directory

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.