I migrated a couple of websites to another server in my cluster. I've found on both sites that the WordPress Rest API is not working. I've checked the permalinks to reactivate the Rest API to no avail. I've tried rebooting as well as reinstalling from a working backup but still no connectivity. I've even tried migrating one of the sites to the original server but no good. Has anyone else encountered this issue and is there a workaround.
We too have faced this issue recently.
If you are using cpfence wp security then yes.
Vortex
ss88us
cPFence doesn’t block the WordPress REST API. You can test it using:
https://cpfence.app/wp-json/ https://cpfence.app/wp-json/wp/v2/posts
If those load fine on your end, your issue likely lies elsewhere.
Just make sure your server IPs are whitelisted as explained here.
If you still run into issues, feel free to open a ticket and we’ll be happy to take a look.
I'm not versed in cPFence but that could be the issue.
If you manually go to: domain.com/wp-json/wp/v2/users does anything load? If it doesn't load, something is blocking it.
cPFence i had a case where PATCH was not working, when sent from a website i hosted to a 3rd party, ip whitelist did not work, apparently i had enabled one of your wordpress hardening things, once i disabled , everything worked.
cPFence i am not saying it in a bad way, i like your product.
Thanks! Feel free to drop us a ticket anytime, happy to help you get it sorted or fine-tune the hardening rules to fit your setup.