Title: Custom Plugin (mu-plugins) Issue
Last modified: November 23, 2022

---

# Custom Plugin (mu-plugins) Issue

 *  [hemasusi](https://wordpress.org/support/users/hemasusi/)
 * (@hemasusi)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/)
 * Hi,
 * We have one custom plugin page. That page file path is – wp-content\mu-plugins\
   custom_api_logs_list.php
 * We wrote the coding to list all our API logs from database logs table and list
   in the table format – look here – [https://prnt.sc/Swje1VdgkVDh](https://prnt.sc/Swje1VdgkVDh)
 * This page file having code to get data from logs table with offset & limit. But
   facing the slow php error in php slow log – [https://prnt.sc/91W0Y-nAtv8r](https://prnt.sc/91W0Y-nAtv8r)
   
   and please see other errors also in the screenshot. Due to the error, the page
   is not loading, its taking long time and display timeout error ‘The application
   did not respond in time’.
 * Here is some screenshot from coding –
    [https://prnt.sc/WZhGktRewP3X](https://prnt.sc/WZhGktRewP3X)
   [https://prnt.sc/rtcaMBwU2ME4](https://prnt.sc/rtcaMBwU2ME4) [https://prnt.sc/OlaBSDQ6d7cX](https://prnt.sc/OlaBSDQ6d7cX)
   [https://prnt.sc/LkGFGEf1ayvO](https://prnt.sc/LkGFGEf1ayvO)
 * 1. If I try print_r or echo before get_var() query, everything is working, no
   slow in the page. But get_var only not working. All other remaining is working.
   
   2. I tried get_results() instead of get_var() but thats also triggered error &
   not loading
 * Its happened in WP 6.0.2 only i think.. Bcz before in old version, we didn’t 
   face this issue.
 * Can anyone please help.
    -  This topic was modified 3 years, 6 months ago by [hemasusi](https://wordpress.org/support/users/hemasusi/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-plugin-mu-plugins-coding%2Fpage%2F2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/?output_format=md)
[1](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/?output_format=md)
2

 *  Thread Starter [hemasusi](https://wordpress.org/support/users/hemasusi/)
 * (@hemasusi)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/page/2/#post-16239187)
 * Hi,
 * Enabling debug mode in DEV & TEST is fine. but in production may show error to
   customers in website page if debug true.
    So i didn’t try that. Is there any 
   other solution that to print error only in the log files ???
 *  [Seba Ocano](https://wordpress.org/support/users/sebaocano/)
 * (@sebaocano)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/page/2/#post-16240567)
 * That’s true, I usually enable errors, check the problem and go back to disable
   errors. Given that is not an option for you, I suggest you this:
 * Edit wp-config.php file edit like this:
 *     ```
       define( 'WP_DEBUG', true );
   
       define( 'WP_DEBUG_LOG', true );
   
       define( 'WP_DEBUG_DISPLAY', false );
   
       @ini_set( 'display_errors', 0 );
       ```
   
 * and check for logs in this file:
    wp-content/debug.log
 * After checking this error, delete logs or move to other location for security,
   and also disable the debug mode.
 * More detailed guide:
    [https://blog.hubspot.com/website/how-to-set-up-wordpress-error-logs-in-wp-config](https://blog.hubspot.com/website/how-to-set-up-wordpress-error-logs-in-wp-config)
 *  Thread Starter [hemasusi](https://wordpress.org/support/users/hemasusi/)
 * (@hemasusi)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/page/2/#post-16243345)
 * Hi,
 * Thank for the details.
 * Because of this line – define( ‘WP_DEBUG_DISPLAY’, false );
    The errors will 
   not display in the site & admin but can view it in the debug.log file???
 * After viewing the error, i should empty the file & save ?
 * Kindly answer for two questions.
 *  [Seba Ocano](https://wordpress.org/support/users/sebaocano/)
 * (@sebaocano)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/page/2/#post-16243950)
 * Hi [@hemasusi](https://wordpress.org/support/users/hemasusi/) ,
    Question 1: 
   yes, that line hide the errors from visitors. Question 2: I will suggest you 
   to do all the debugging, fix the error, make all the changes to the custom plugin
   files, and after you finish everything, then you disable the debug mode, and 
   delete this log file.
 * The reason for doing this, is that the file route is the default one, and some
   malicious user could download this file and get information about the server.
   It’s not a huge security problem, but it’s a good practice to delete it after
   the end of debugging.

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/?output_format=md)
[1](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/?output_format=md)
2

The topic ‘Custom Plugin (mu-plugins) Issue’ is closed to new replies.

## Tags

 * [fatal+error](https://wordpress.org/support/topic-tag/fatalerror/)
 * [get_results](https://wordpress.org/support/topic-tag/get_results/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 22 replies
 * 2 participants
 * Last reply from: [Seba Ocano](https://wordpress.org/support/users/sebaocano/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/custom-plugin-mu-plugins-coding/page/2/#post-16243950)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
