[resolved] [closed] wp-json.php works OK but all other URLS 404 (5 posts)

  1. perryb
    Posted 2 years ago #

    Hi - I'm running WP on Nginx with pretty permalimks set up.

    After a bit of tinkering - installing via the Plugins > Add new didn't work, I had to manually copy the files into my root and wp-includes - I got an output at mydomain/wp-json.php.

    Even though the links appear to mydomain/wp-json.php/posts etc (I'm using Firefox Json View) each one 404s.



  2. Dalton Rooney
    Posted 2 years ago #

    Did you refresh your permalinks after copying the files over to your WP installation?

  3. perryb
    Posted 2 years ago #

    Yes I did - it turns out that the placement of the plugin files caused the problem.

    I realised that the pages weren't 404ing and were just blank so I switched debug back on and got this:

    Warning: include_once(/mydomain.co.uk/public/wp-content/plugins/json-rest-api/lib/class-wp-json-server.php): failed to open stream: No such file or directory in /mydomain.co.uk/public/wp-content/plugins/json-rest-api/plugin.php on line 13 etc....

    So I copied the files back into the plugin folder and everything seems to be working fine now.

    Not sure why the initial plugin install didn't work - and manually copying files only partially worked.

    Hope this helps

  4. Ryan McCue
    Plugin Author

    Posted 2 years ago #

    The integrated option is not recommended, and will break at the moment. Sorry about the unclear documentation on that.

  5. oedipamaas
    Posted 2 years ago #

    I'm getting the same thing...the initial curl for wp-json.php works, but everything else 404s (according to the header). I'm watching my debug.log, but no warnings about the server file not being found. I downloaded the plugin via the wordpress dashboard, then went onto the server and moved the two files as instructed. Then I experienced a brief moment of joy when the initial curl command worked to just wp-json.php. Followed by the familiar letdown of realizing nothing else fetched any json.

    My site url has an ip. So it's http://34.654.xx.xx/sitename/

    Will it work with this structure? What do you mean by integrated option?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic