X
🐾 Coming from PetMatchPro 6.x? Version 8 adds real adoption analytics, similar-animal suggestions, SEO-friendly URLs, and overlay badges. See What's New →
PetMatchPro
  • Partners
    • AnimalsFirst
    • PetPoint
    • RescueGroups
  • What’s New
  • Shop
  • Demo
  • FAQ
  • Knowledge Base
  • About Us
  • Contact Us
  • My Account
  • Cart
Select Page
Green rocket icon for Getting Started documentation category

Getting Started

6
  • Activate Your License
  • Setup Wizard Walkthrough
  • Connecting Your Shelter System
  • Understanding License Tiers
  • Creating Your First Search Page
  • Creating Your First Detail Page
Blue code brackets icon for Shortcodes and Configuration documentation category

Shortcodes & Configuration

12
  • Shortcode Builder
  • [pmp-search] Reference
  • [pmp-details] Reference
  • [pmp-detail] Reference
  • [pmp-option] Reference
  • Parameters by License Tier
  • Common Shortcode Recipes
  • Pagination Setup
  • Excluding Values
  • Search Filter Button
  • Detail Button Hover Text
  • Search Card Hover Text
Purple palette icon for Templates and Design documentation category

Templates & Design

9
  • Search Templates Gallery
  • Detail Templates Gallery
  • Poster Templates
  • Theme Template Overrides
  • Color Customization
  • Font Size Customization
  • Detail Title Formats
  • Dynamic Banners
  • Bulk Poster Print
Orange image with star icon for Icons and Overlays documentation category

Icons & Overlays

6
  • Understanding Pet Icons
  • Understanding Overlays
  • Icon Reference Gallery
  • Customizing Icon Display
  • Value-Based Icons
  • Icon Size Customization
Teal tag icon for Labels and Customization documentation category

Labels & Customization

3
  • Custom Labels Guide
  • Changing Labels via Filtering
  • Custom Currency & Date Formats
Blue funnel icon for Filters and Search documentation category

Filters & Search

6
  • Custom Filter Groups & Labels
  • Setting Up Search Filters
  • Species & Breed Filtering
  • Filter Value Management
  • Excluding Values via Filtering
  • Partner-Specific Filter Options
Violet chain link icon for Partner Integration Guides documentation category

Partner Guides

3
  • AnimalsFirst Integration Guide
  • PetPoint Integration Guide
  • RescueGroups Integration Guide
Red bar chart icon for Analytics and Tracking documentation category

Analytics & Tracking

8
  • Understanding PMP Analytics
  • GA4 Configuration
  • Google Tag Manager Setup
  • Leveraging Analytics
  • WP-Cron Requirements for PetMatchPro Analytics
  • Queue Health and Tools
  • Privacy and Data Retention
  • Off-Bootstrap Impression Ingest
Amber wrench icon for Troubleshooting and FAQ documentation category

Troubleshooting

16
  • Common Error Messages
  • API Connection Issues
  • Template Not Found Errors
  • Theme Template Override Not Loading
  • Performance & Caching Best Practices
  • Animals Not Displaying
  • Stale Content / Cache Issues
  • Styling Conflicts
  • Empty Field Display
  • Analytics Queue Stuck or WP-Cron Not Running
  • Premium Feature Not Appearing After Upgrade
  • Troubleshoot the PetMatchPro Shortcode Builder
  • Reading PMP Debug Logs
  • wp-config.php Configuration Constants
  • Performance Profiler
  • How to Contact Support
Lightbulb icon representing PetMatchPro best practices guides for homepage layouts, button strategy, performance tuning, and template selection

Best Practices

11
  • Featuring Animals on Your Homepage
  • Adding Animals to Sidebars and Other Pages
  • Using Banners and Subtitles Effectively
  • Overlays and Icons for Quick Visual Cues
  • Writing Effective Detail Page Instructions
  • Button Configuration for Conversion
  • Optimizing Performance with API Caching
  • Customizing Typography and Icon Sizes
  • Lost and Found Search Best Practices
  • Template Selection Guide
  • Preconnect to Your Partner Photo CDN – PetMatchPro
View Categories
  • Home
  • Knowledge Base
  • Troubleshooting
  • wp-config.php Configuration Constants

wp-config.php Configuration Constants

4 min read

0:00 / 4:02
  • View as Markdown Open this page as plain Markdown (opens in a new tab)
  • Open in ChatGPT Ask questions about this page (opens in a new tab)
  • Open in Claude Ask questions about this page (opens in a new tab)
  • Open in Google AI Studio Ask questions about this page (Google account required) (opens in a new tab)

PetMatchPro reads a small set of optional define() constants from wp-config.php. These are operator-only kill switches, rollback toggles, and debugging hooks – none are required for normal plugin operation.

Use these when you need a site-wide effect that does not require a theme or mu-plugin file edit, or when you want a configuration to survive theme switches and plugin updates.

How to Add a Constant #

Open wp-config.php at the root of your WordPress install. Add the define() line above this comment block:

/* That's all, stop editing! Happy publishing. */

Adding constants below that line is supported by WordPress but conventionally avoided. Adding them above is the safe location.

Important: add_filter() and other WordPress functions are not available in wp-config.php because the file runs before WordPress core loads. Calling add_filter() there produces a fatal error and a 500 page. Use define() for the constants on this page; use add_filter() in your theme’s functions.php or in an mu-plugin file.

Constant Reference #

PMP_ANALYTICS_LEGACY_READS #

Since: 8.9.6
Type: boolean
Default: not defined (uses 8.9.4+ daily-table reads)

When defined and truthy, three dashboard read methods that were migrated to the daily summary table in 8.9.4 fall back to their pre-8.9.4 raw-events implementation:

  • getTotalEvents() / getTotalEventCount() – reverts SUM(event_count) FROM daily to COUNT(*) FROM events
  • getAnimalsNeedingAttention() – the Insights “Animals Needing Attention” panel
  • getStaleListings() – the Insights “Declining Click Rates” panel

Use as a one-line rollback if a migrated widget shows surprising numbers and you want to compare against the legacy implementation while the issue is investigated. Reverts on the next request – no plugin downgrade or restart needed.

// wp-config.php
define( 'PMP_ANALYTICS_LEGACY_READS', true );

Equivalent filter (use this if you cannot edit wp-config.php):

// theme functions.php or wp-content/mu-plugins/pmp-legacy.php
add_filter( 'pmp_analytics_legacy_reads', '__return_true' );

The constant takes precedence over the filter when both are set.

To turn the rollback off, either remove the define() line or change the value to false.

PMP_PROFILE #

Since: 8.26.0
Type: boolean (strict – must be exactly true)
Default: not defined (profiler off)

Turns on the lightweight request profiler, which writes coarse server-side timing lines to the PHP error log so a slow search render can be diagnosed on a live site without a custom build. It is one of three conditions that must all be met before a single line is logged: the constant is true, the current user can manage_options, and the URL carries ?pmp_profile=1. A logged-out visitor adding the query string never triggers any logging, and the rendered HTML is byte-identical whether the profiler is active or not.

// wp-config.php
define( 'PMP_PROFILE', true );

There is no equivalent filter – requiring a wp-config.php edit keeps the profiler hard to turn on by accident. To turn the profiler off, remove the define() line. See Performance Profiler for how to run it and read the output.

PMP_CARD_DATA_ALL #

Since: 8.26.0
Type: boolean (strict – must be exactly true)
Default: not defined (trimmed card attributes)

Restores the pre-8.26.0 behavior of emitting every non-empty API field as a data-* attribute on each search card. As of 8.26.0 each card emits only the attributes PetMatchPro’s own filter, sort, and date-sort controls actually read, which trims page weight and server render time on large listing pages. Define this constant if a theme or custom script you maintain reads a card field attribute that is no longer present, as a one-line rollback while you migrate that script.

// wp-config.php
define( 'PMP_CARD_DATA_ALL', true );

Reverts on the next request – no plugin downgrade or restart needed. To return to the trimmed output, remove the define() line.

Adding Future Constants #

This page is the canonical reference for plugin constants. When PetMatchPro adds a new define() hook in a future release, the constant appears here with its full description, expected type, default behavior, and a code example. The same constant is also summarized in the plugin’s readme.txt “Configuration Constants” FAQ section that ships with every release.

Related #

  • Performance Profiler – running the profiler and reading its output
  • Analytics Queue and WP-Cron Issues – cron-side diagnostics
  • Performance and Caching Best Practices – related plugin-side caching toggles
  • Contact Support – if a constant does not have the expected effect
wp-config.php Configuration Constants ultima modifica: 2026-05-05T20:17:25-04:00 da PetMatchPro
Updated on October 25, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Reading PMP Debug LogsPerformance Profiler

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents
  • How to Add a Constant
  • Constant Reference
    • PMP_ANALYTICS_LEGACY_READS
    • PMP_PROFILE
    • PMP_CARD_DATA_ALL
  • Adding Future Constants
  • Related

© Copyright 2018-2026 by PetMatchPro, All Rights Reserved

  • Privacy Policy
  • Terms of Use
  • Disclaimer
  • Login
imunify-bot-check