Title: Cannot Connect to WordPress Rest API
Last modified: September 2, 2020

---

# Cannot Connect to WordPress Rest API

 *  Resolved [jkrakar](https://wordpress.org/support/users/jkrakar/)
 * (@jkrakar)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cannot-connect-to-wordpress-rest-api/)
 * I’m having a problem with a site I’m developing. I keep getting a message from
   Siteground Optimizer plugin that says: “Could not connect to the WordPress REST
   API
    Either a security plugin, custom function or rules in your .htaccess file
   is preventing the WordPress REST API from working properly. SG Optimizer is using
   it to store its options and other functionalities so please make sure it works
   properly.” I tried contacting their tech support and they said to contact WP 
   support. This error started happening today. I tried resaving my permalinks because
   I read that was helpful but I got a message that my .htaccess file isn’t writeable,
   which is strange because it has 644 permission, which is optimal. My hosting 
   company was not having the same issue when they accessed the website. I cleared
   all my caches including my DNS cache, browser cache, SG Optimizer caches, Cloudflare
   cache. I’m still getting the error message. Any ideas why?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcannot-connect-to-wordpress-rest-api%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [jkrakar](https://wordpress.org/support/users/jkrakar/)
 * (@jkrakar)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cannot-connect-to-wordpress-rest-api/#post-13347804)
 * I did clear my DNS cache and my browser cache again and then logged in again 
   and my access to the site was restored. So something is randomly giving me Rest
   API access issues, apparently.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/cannot-connect-to-wordpress-rest-api/#post-13347963)
 * Probably was a cache issue.
 * Glad it’s sorted 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cannot Connect to WordPress Rest API’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/cannot-connect-to-wordpress-rest-api/#post-13347963)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
