Title: Help Tracking Down Maintenance Code
Last modified: September 22, 2017

---

# Help Tracking Down Maintenance Code

 *  Resolved [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/help-tracking-down-maintenance-code/)
 * Within the last couple version of WordPress, on all my WordPress installs ( more
   than 50 ) WordPress is leaving behind all the maintenance residuals:
 *  – wp-content/maintenance.php
    – wp-content/maintenance/template.phtml – wp-content/
   maintenance/assets/*
 * And I receive the following error in my debug logs:
 * `PHP Notice: Undefined variable: timer in /wp-content/maintenance/template.phtml
   on line 22`
 * So now my question is: Where is template.phtml being created / used so I can 
   trackdown where the $timer variable is being set and maybe what could be causing
   this issue. Any other suggestions on the best way to replicate the issue would
   be awesome too. Can someone explain which files to look at in how WordPress creates/
   removed these maintenance files please?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 8 months ago](https://wordpress.org/support/topic/help-tracking-down-maintenance-code/#post-9518756)
 * Per our discussion on IRC, I suggest you try
 * `grep -r 'maintenance.php' *`
 * to see if anything (plugin,etc.) is looking for that file
    -  This reply was modified 8 years, 8 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/help-tracking-down-maintenance-code/#post-9519007)
 * [@sterndata](https://wordpress.org/support/users/sterndata/) Thanks! The only
   thing I have relating to maintenance in my MU plugin and my custom plugin is 
   that in my MU Plugin, it drops out of a functions if `.maintenance` file exists
   in the root directory which as far as I can tell is fine:
 * `if( ! file_exists( ABSPATH . '.maintenance' ) )`
 * [@clorith](https://wordpress.org/support/users/clorith/) pointed out that template.
   phtml doesn’t exist in WP Core.
 * I think we’ve narrowed it down the Plesk WordPress Toolkit which we have no control
   over. So… I guess that’s that then. Thanks everyone!
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 8 months ago](https://wordpress.org/support/topic/help-tracking-down-maintenance-code/#post-9519010)
 * Good to know all your sites weren’t hacked!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Help Tracking Down Maintenance Code’ is closed to new replies.

## Tags

 * [updated](https://wordpress.org/support/topic-tag/updated/)
 * [updating](https://wordpress.org/support/topic-tag/updating/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/help-tracking-down-maintenance-code/#post-9519010)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
