3

I have installed WP 4.9.5 using nginx and the following plugins: Gravity Forms (v2.3.1) by rocketgenius Advanced Custom Fields PRO (v5.6.10) by Elliot Condon Timber (v1.7.0) by Jared Novack + Upstatement WooCommerce Additional Variation Images (v1.7.12) by WooCommerce WooCommerce (v3.3.5) by Automattic

For some reason i cannot understand REST api calls are not working and return 404 error. I am trying the simplest GET without requiring authentication

http://domain.test/wp-json/wc/v2/

any help appreciated!

5
  • DId you turn on pretty permalinks? Without rewrite rules the REST API doesn't work
    – Tom J Nowell
    May 13, 2018 at 21:00
  • Yes! Permalinks are enabled. I have also tried to make calls using query string parameter (without permalinks) with no success.
    – stefan0s
    May 14, 2018 at 6:40
  • Have you contacted the support routes for those plugins?
    – Tom J Nowell
    May 14, 2018 at 22:45
  • I have this same issue. I'm on an Ubuntu-server, but I've simply pointed my host-file to point to the IP. I must admit I'm not 100% sure how the restful API works, if that has any effect or not. I'm on WP version 4.9.8, - and have the problem when I activate the Gutenberg-plugin.
    – Zeth
    Aug 19, 2018 at 13:16
  • Same issue in 2019. They see this error beeing up for years, why the heck don't they do anything, like improve debugging for this case... noobs.
    – Daniel W.
    Oct 24, 2019 at 12:30

1 Answer 1

3

I commented this, for my situation:

I have this same issue. I'm on an Ubuntu-server, but I've simply pointed my host-file to point to the IP. I must admit I'm not 100% sure how the restful API works, if that has any effect or not. I'm on WP version 4.9.8, - and have the problem when I activate the Gutenberg-plugin.

It seems that my .htaccess-file wasn't writable (I saw that it wasn't in the bottom of the 'Permalinks'-page, where it said that it was a bit sad). When I added the .htaccess-file manually and uploaded it, with below-written content, then it started worked.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.