[SOLVED] Google Site Kit Cannot Access The WordPress REST API. Please Ensure It Is Enabled On Your Site – Easy Solution In 5 Mins!

[SOLVED] Google Site Kit cannot access the WordPress REST API. Please ensure it is enabled on your site
Share this post and Earn Free Points!

In this post I will try help you to solve the error: Site Kit" cannot access the WordPress" REST API. Please ensure it is enabled on your site.

I encountered this error when I was trying to install the Google Site Kit" Plugin in WordPress". I might be very frustrated when you would like to move forward and install this plugin to setup the Google Analytics, Google Adsense, Google Search Console and Google Page Insights. In this post I will give you the tips where you can find the real root cause of this issue.

Introduction

REST API

REST (Representational State Transfer) is an architectural style for building web services. RESTful APIs (Application Programming Interfaces) are built on the REST architecture and are designed to expose a set of resources that represent the underlying data and functionality of a system.

REST APIs use HTTP (Hypertext Transfer Protocol) as the underlying protocol for transferring data. They use a set of standardized methods (such as GET, POST, PUT, and DELETE) to retrieve and manipulate data, and rely on HTTP status codes to indicate the success or failure of an operation.

REST APIs are designed to be flexible, scalable, and independent of the underlying implementation of the system. They can be used to build web-based applications that are accessed via a web browser, mobile apps, or other applications that need to access data or functionality from a server.

WordPress Plugins

WordPress" plugins are pieces of software that can be added to a WordPress" website to extend its functionality. Plugins are written in the PHP programming" language and integrate seamlessly with WordPress".

There are thousands of WordPress" plugins available, ranging from simple tools that add a single feature to your site, to complex plugins that add multiple features and functionality. Some examples of the types of functionality that can be added through plugins include:

  • Contact forms
  • SEO" tools
  • E-commerce functionality
  • Social media integration
  • Security enhancements
  • Analytics and tracking

To install a WordPress" plugin, you can log in to your WordPress" dashboard, navigate to the “Plugins” menu, and click the “Add New” button. From there, you can search for a plugin by keyword, or upload a plugin file that you have downloaded from another source. Once you have found the plugin you want to install, you can click the “Install Now” button to install it on your site.

What Is Google Site Kit?

Google’s official WordPress" plugin, Site Kit, provides insights into how visitors locate and interact with your website. The all-in-one solution for deploying, managing, and obtaining insights from vital Google technologies is called Site Kit", and it helps websites succeed online. It offers reliable, current information from several Google products right on the WordPress dashboard for simple access, all for nothing.

If you are encountering an error with Site Kit", it is likely that there is a problem with the plugin or with your Google account". Some common issues with Site Kit" include problems with authentication or authorization, conflicts with other plugins or themes, and issues with data tracking or display. To troubleshoot the error, you may need to check your plugin settings, review any error messages or logs, and ensure that you have a valid and active Google account".

Google Site Kit Services

As I mentioned above you can setup connection to multiple Google Services using Google Sit Kit. The follwing screenshots presents the 4 services setup. Currently there are available additional two:

[SOLVED] Site Kit cannot access the WordPress REST API. Please ensure it is enabled on your site
[SOLVED] Site Kit" cannot access the WordPress" REST API. Please ensure it is enabled on your site
  • Google Optimize – Create free A/B tests that help you drive metric-based design solutions to your site. Google Optimize is a free website testing and optimization platform that helps you improve the performance and user" experience of your website. It allows you to create and run experiments on your website, track the results, and make informed decisions about how to optimize your site based on the data you collect. You can use Google Optimize to test different versions of your website’s design, layout, and content to see which ones perform the best. You can also use it to personalize the user" experience for different segments of your audience, such as by location or device type. Google Optimize works with Google Analytics to give you a complete picture of your website’s performance and user" behavior.
  • Google Tag Manager – is a platform that helps you add and manage marketing and analytics tags on your website. With Tag Manager, you can add and update tags without having to modify your website’s code, which makes it easier to track and measure the performance of your site.
  • Google Search Console – is a free tool" that helps you monitor and maintain your website’s presence in Google search results. It allows you to see how your site appears in search results, submit new content for crawling, and identify any crawl errors or security issues.
  • Google AdSense – is a program that allows you to earn money by displaying targeted ads on your website. When a user" clicks on one of the ads, you earn a share of the revenue generated by the click. AdSense uses algorithms to match ads to your website content and audience, ensuring that the ads are relevant and valuable to your users.
  • Google Analytics – is a free web analytics service that helps you track and analyze the traffic and behavior of your website’s users. It provides a range of reports and tools that help you understand your site’s performance, user" demographics, and marketing effectiveness.
  • Google PageSpeed Insights – is a tool that analyzes the performance of your website on desktop and mobile devices, and provides recommendations for improving its speed and user" experience. PageSpeed Insights uses data from the Chrome user" Experience Report to identify issues that may be affecting your site’s performance, such as slow loading times or unoptimized images.
[SOLVED] Site Kit cannot access the WordPress REST API. Please ensure it is enabled on your site
[SOLVED] Site Kit" cannot access the WordPress" REST API. Please ensure it is enabled on your site

Google Site Kit Cannot Access The WordPress REST API. Please Ensure It Is Enabled On Your Site

Let’s try to solve this issue. For me, the problem was quite strange, because everything was working, I did something in the meantime and after a while discovered that the Google Sit Kit plugin was not working. And this is what prompted me to reflect and ask myself:

What Happened In The Meantime That Could Have Influenced It?

Deactivate Plugins One By One

I realized that from such major changes I was installing new plugins. And it was there that I started looking for the cause. I didn’t know which Plugin causes errors with WordPress" REST API, so I deactivated them one by one and looked to see if deactivating a given plugin changed something. And it turned out to be a bull’s eye!

In my case, it turned out that the Query Monitor plugin was causing the problems. When I turned it off, everything started working and it returned to normal.

Query Monitor Plugin

The WordPress" developer tools panel is called Query Monitor. Database queries, PHP errors, hooks and actions, block editor blocks, enqueued scripts and stylesheets, HTTP API requests, and more may all be debugged with this tool.

It has several sophisticated features including user" capability checks, REST API calls, and Ajax call debugging. You may rapidly identify underperforming plugins, themes, or functionalities by limiting a large portion of its output by plugin or theme.

Query Monitor puts a lot of effort into making its information easy to understand. One way it does this is by grouping aggregate database" queries by the plugins, themes, or functions that are in charge of them. It adds an admin toolbar menu with an overview of the current page, and when you pick a menu item, detailed debugging information is displayed in panels

Summary

If you have encountered this problem: Site Kit" cannot access the WordPress" REST API. Please ensure it is enabled on your site or similar, and you have no idea", first try to think if you have not done something in the meantime that could break it 🙂

And then, if you have no idea, the best method is trial and error. See other tips.

Could You Please Share This Post? 
I appreciate It And Thank YOU! :)
Have A Nice Day!

How useful was this post?

Click on a star to rate it!

Average rating 4.7 / 5. Vote count: 15

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?