Title: how to find which php script is triggering query
Last modified: April 2, 2018

---

# how to find which php script is triggering query

 *  Resolved [soeezauto](https://wordpress.org/support/users/soeezauto/)
 * (@soeezauto)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/how-to-find-which-php-script-is-triggering-query/)
 * Hello
 * I have an issue already reported [here](https://wordpress.org/support/topic/600-duplicate-queries-to-wp_options/)
   of multiple duplicate queries being generated.
 * I’ve installed Query Monitor and Debug Bar and they tell me which is the query.
 * That’s fine, but it does not indicates where is the query coming from, ie, which
   php script, or scripts, is generating those queries.
 * For instance:
 *     ```
       SELECT option_name, option_value
       FROM wp_options
       WHERE autoload = 'yes'
       ```
   
 * I know this is generated by function
 * > wp_load_alloptions
 *  which is on file
 * > wp-includes/options.php
 * .
 * But there’s a huge amount of php scripts that may trigger that function and the
   plugins above do not help to shed light on that question.
 * Any ideas?
 * Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhow-to-find-which-php-script-is-triggering-query%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/how-to-find-which-php-script-is-triggering-query/#post-10138831)
 * I recommend asking at [https://wordpress.org/support/plugin/query-monitor](https://wordpress.org/support/plugin/query-monitor)
   so the plugin’s developers and support community can help you with this.

Viewing 1 replies (of 1 total)

The topic ‘how to find which php script is triggering query’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/how-to-find-which-php-script-is-triggering-query/#post-10138831)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
