Title: REQ: deliver empty my-hacks.php
Last modified: August 18, 2016

---

# REQ: deliver empty my-hacks.php

 *  [kishore](https://wordpress.org/support/users/kishore/)
 * (@kishore)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/)
 * I understand [http://wiki.wordpress.org/index.php/my-hacks.php](http://wiki.wordpress.org/index.php/my-hacks.php)
   
   Why not the following: 1) set hack_file to true by default ! 2) deliver an empty
   my-hacks.php with no leading or trailing lines in the file and some documentation
   inside the <? and ?> Advantage: At [http://www.kishore.org/wp/wp-admin/templates.php](http://www.kishore.org/wp/wp-admin/templates.php),
   one of the common files listed is my-hacks.php. But since the file doesnot exist,
   one has to create the file first outside WP. The above will eliminate this step!
   To summarise, deliver a file and WP should work _as if_ it doesn’t exist and 
   still nothing happens. In this way, there should be no performance problems too…
   right ? ( including an empty php file ) Another option: deliver a simple my-hacks
   implementation with docu for any user to understand how the “my-hacks.php” concept
   works…

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

 *  [Jean-Pierre Michaud](https://wordpress.org/support/users/nexia/)
 * (@nexia)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37451)
 * goos suggestion, at least for the file itself with the default php tags… will
   cut some reclaims.
 *  [Laughinglizard](https://wordpress.org/support/users/laughinglizard/)
 * (@laughinglizard)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37457)
 * Actually, the whole point of my-hacks.php is that this file does not get overwritten(
   or rewritten with a CVS diff) on upgrade of a version of WordPress. If an empty
   my-hacks.php was included in the installation, many people would overwrite (by
   mistake) their existing my-hacks with the new, empty version, thus defeating 
   the purpose of having a my-hacks file.
    Furthermore, not everyone uses hacks 
   inside their WordPress installation and in my opinion, the hack file should not
   be set to true by default. You mention performance problems with my-hacks.php
   that I am not aware of. As for including a simple my-hacks with the install, 
   the same problem arises as above. The documentation in the wiki is the best source(
   at this time) for information about this file and how to set it up.
 *  [Jean-Pierre Michaud](https://wordpress.org/support/users/nexia/)
 * (@nexia)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37459)
 * hum… ya, this is a point… btw, can we integrate a wp-hacks-sample.php, so if 
   we want to use one, we rename this file ?!”. as the config file…
 *  [Laughinglizard](https://wordpress.org/support/users/laughinglizard/)
 * (@laughinglizard)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37460)
 * my-hacks-sample.php might work, worth considering even with some sample (and 
   simple) hacks.
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37494)
 * And maybe I’m just being thick about it, but how is having a my-hacks-sample.
   php any better than the current method (which is no file?). I’m not saying it’s
   a bad idea, just wondering what the advantage is.
    TG
 *  [Sushubh](https://wordpress.org/support/users/sushubh/)
 * (@sushubh)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37497)
 * give some sample hacks in the my-hacks file.
    but i believe all of them requires
   custom tags in the index file. guys, u have to make a normal text file. dont 
   tell me it’s tough…
 *  [willm](https://wordpress.org/support/users/willm/)
 * (@willm)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37534)
 * Exactly. People too dumb to figure out how to create a text file and save it 
   as php will not be using this tool anyway.
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37544)
 * I agree also. If somone can find a hack, I think they can figure out how to create
   the file correctly or search for how to do it.
 *  Thread Starter [kishore](https://wordpress.org/support/users/kishore/)
 * (@kishore)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37549)
 * To LaughingLizard,
    1) I totally agree that an upgrade should not touch my-hacks.
   php. Even then, the upgrade could still setup a valid my-hacks.php if there is
   none… e.g., Maybe in version 0.x there is no such concept and the concept is 
   in 1.x ! 2) But Please explain why a new install will cause a problem by delivering
   a simple valid “my-hacks.php” 3) Performance problems: I am stating that there
   should be no performance problems – if a empty and/or valid my-hacks.php is delivered!
   4) It is true that a text file can be created outside… I just thought that an
   empty/valid my-hacks.php will make the system a little-bit more usable !
 *  [Sushubh](https://wordpress.org/support/users/sushubh/)
 * (@sushubh)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37551)
 * when u upgrade, u overwrite all the files on the server and run the upgrade.
   
   this is the reason we dont have a sample config file with the original name.

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

The topic ‘REQ: deliver empty my-hacks.php’ is closed to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 10 replies
 * 7 participants
 * Last reply from: [Sushubh](https://wordpress.org/support/users/sushubh/)
 * Last activity: [22 years, 3 months ago](https://wordpress.org/support/topic/req-deliver-empty-my-hacksphp/#post-37551)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
