Back to Community

Resolving PHP Deprecated Warnings in Google Site Kit

12 threads Sep 7, 2025 PluginSite kit by google

Content

If you've recently updated your PHP version or the Google Site Kit plugin itself, you might be seeing a series of "PHP Deprecated" warnings in your server logs or even on your website's front end. A common error points to a specific file and line number:

Deprecated: Creation of dynamic property GoogleSite_KitModulesAdsWeb_Tag::$home_domain is deprecated in /.../google-site-kit/includes/Modules/Ads/Web_Tag.php on line 37

This guide will explain what these warnings mean and the steps you can take to address them.

What Do These PHP Deprecated Warnings Mean?

These warnings are not unique to your site. They are triggered by newer versions of PHP (8.2 and above), which have become stricter about certain coding practices. Specifically, PHP now discourages the "dynamic creation of object properties"—a practice where a property is assigned to an object without first being defined in the class.

It's important to understand that these are deprecation notices, not fatal errors. In nearly all cases, they do not cause the plugin to malfunction, break your site, or affect your Google Ads performance. The functionality of Site Kit remains intact. The primary concern for most users is that these notices are being written to public-facing error logs.

Why Is This Happening with Site Kit?

Based on community reports and official plugin responses, these warnings typically originate from third-party libraries that the Site Kit plugin depends on, rather than from the core plugin code itself. The 'Site Kit by Google' team is aware of these issues and has publicly tracked them on their GitHub repository. They are working to update these dependencies in future plugin releases to ensure full compatibility with modern PHP versions.

Common Solutions and Workarounds

1. Wait for an Official Plugin Update (Recommended)

The most straightforward solution is to wait for the 'Site Kit by Google' team to release an update that patches these compatibility issues. Since the warnings do not impact functionality, it is often safe to ignore them until a fix is deployed. You can follow the progress on the official GitHub issues page.

2. Adjust Your Site's Error Reporting Level

If the public visibility of the warnings is a concern, you can configure your site to suppress deprecation notices. This prevents them from being logged or displayed, while still allowing more critical errors to be reported.

Important: Editing core files is not recommended. Instead, you can add the following line to your site's wp-config.php file, above the line that says /* That's all, stop editing! Happy publishing. */.

// Suppress deprecation warnings
ini_set('display_errors', 'Off');
ini_set('error_reporting', E_ALL & ~E_DEPRECATED);

Alternatively, you can contact your web hosting provider and ask them to adjust the PHP error reporting level for your account to exclude E_DEPRECATED warnings.

3. Temporarily Disable the Ads Module (If Causing Display Issues)

In one rare instance from the support threads, a user reported that the deprecated notice was creating a visible whitespace on their front end. If you are experiencing a similar visual issue, you can try temporarily disconnecting the Ads module within the Site Kit dashboard (Site Kit > Settings > Connected Services > Ads > Edit > Disconnect). Reconnect it after a future plugin update has been installed.

When to Seek Further Help

You should only be concerned if these deprecation notices are accompanied by actual functional problems, such as:

  • The Site Kit dashboard failing to load or display data.
  • Other parts of your WordPress admin breaking.
  • Google Ads not being placed correctly on your site.

If you experience any functional issues, it is best to share your Site Health information (found under Tools > Site Health > Info) on a relevant support forum for a more detailed diagnosis.

For most users, these PHP deprecated warnings are a harmless side effect of running cutting-edge PHP with a plugin that uses older libraries. The best course of action is usually a patient wait for the next update.