Issues with WP API Integration on My WordPress Site – Seeking Advice

Fabina Sari - Sep 2 - - Dev Community

Hello DEV Community,

I’ve been working on enhancing the functionality of my WordPress site, WPTroubles.com, by integrating several APIs, but I’ve run into a few issues that I’m hoping to get some advice on:

REST API Endpoints Not Responding Consistently: I’m using the WP REST API to pull in data for some dynamic content, but I’m noticing that certain endpoints aren’t responding consistently. Sometimes they return the expected data, while other times they time out or return empty responses. I’ve checked the server logs but haven’t found any clear issues.

CORS Policy Blocking External API Requests: I’ve been trying to integrate an external service into my WordPress site via their API, but I keep running into CORS policy issues. Despite adding the necessary headers in my functions. php file, the requests are still being blocked. This is preventing me from fully utilizing the service’s features on my site.

Slow Performance When Using Multiple APIs: I’ve noticed that the site’s performance significantly drops when multiple API requests are made simultaneously. This includes slower page load times and occasional crashes when the load is high. I’ve tried optimizing the code and using caching, but the problem persists.

I’ve detailed these issues further on my site Wptroubles.com, where I’ve also documented the troubleshooting steps I’ve already taken. If anyone here has experience with these kinds of issues or can point me in the right direction, I’d really appreciate it.

Thanks in advance for your help!

. . .
Terabox Video Player