Skip to content

Add hosting provider detection, multisite flag, and user profile URLs#212

Open
claytoncollie wants to merge 3 commits intodevelopfrom
feature/hosting-provider-detection
Open

Add hosting provider detection, multisite flag, and user profile URLs#212
claytoncollie wants to merge 3 commits intodevelopfrom
feature/hosting-provider-detection

Conversation

@claytoncollie
Copy link
Contributor

@claytoncollie claytoncollie commented Feb 21, 2026

Summary

  • Add get_hosting_provider() method that auto-detects hosting platform via PHP constants (VIP, Kinsta, WP Engine, Pantheon, Pagely, Flywheel, Cloudways)
  • Refactor get_is_using_object_cache() VIP check to use centralized hosting detection
  • Send hosting_provider and is_multisite in report
  • Send profileUrl (wp-admin user search URL) for each user in get_users()
  • Fix db_version — was checking a non-existent $wpdb->db_version property instead of calling $wpdb->db_version()

Closes #205

Test plan

  • Trigger a report via wp cron event run send_daily_report_cron
  • Verify hosting_provider appears in report (value depends on host; unknown on generic hosting)
  • Verify is_multisite appears in report (true on multisite, false on single site)
  • Verify each user entry includes profileUrl with a wp-admin search URL
  • Verify db_version is now populated (e.g. 8.0.39) instead of empty
  • Test hosting detection by temporarily defining a host constant (e.g. define('KINSTA_DEV_ENV', true)) and confirming the correct provider is returned
  • On a VIP environment, verify get_is_using_object_cache() still returns true via the refactored check

- Add get_hosting_provider() method that detects platform via PHP constants
  (VIP, Kinsta, WP Engine, Pantheon, Pagely, Flywheel, Cloudways)
- Refactor get_is_using_object_cache() VIP check to use centralized detection
- Add hosting_provider and is_multisite to report customData
- Add profileUrl (wp-admin search URL) to each user in get_users()
- Fix db_version using method call instead of non-existent property

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claytoncollie claytoncollie self-assigned this Feb 21, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claytoncollie
Copy link
Contributor Author

@darylldoyle This is reday for your review. It is part of work I am doing in the Monitor repo linked in the PR. Once this PR is merged, it unblocks the Monitor PR and finish testing that work.

darylldoyle
darylldoyle previously approved these changes Feb 26, 2026
@darylldoyle darylldoyle added this to the 1.18.0 milestone Feb 26, 2026
These are static environment metadata that belong as first-class fields
in the POST payload rather than embedded in the customData array.
Monitor reads them directly with a backward-compatible fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claytoncollie
Copy link
Contributor Author

@darylldoyle I moved the data from the customData array to the main body. Can you have one more look and approve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect and report name of hosting provider

2 participants