Wordpress JsonAPI - /wp-json/ was not found on this server Wordpress JsonAPI - /wp-json/ was not found on this server wordpress wordpress

Wordpress JsonAPI - /wp-json/ was not found on this server


The current version of REST api for sites with pretty permalinks not enabled, the url

    yoursite.com/?rest_route=/ 

will work .


The WordPress JSON API depends on pretty permalinks, make sure you have them enabled for the site.


In my case, I got this error after installing/configuring apache2 on my local linux machine. I finally found the error to be cause by the rewrite module not being enabled which I fixed using,

sudo a2enmod rewrite

as well as ensuring that my apache2.conf file (located in the folder /etc/apache2) has its<Directory> directive 'AllowOverride' set to all rather than none, from

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted</Directory>

to

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted</Directory>

then I restarted apache2 service and the problem was resolved.