my-hacks.php no longer supported

A long time ago in a WordPress far, far away sites were customized via the use of a my-hacks.php file. Then 2005 came along and brought with it a new developer feature: Plugins and Themes. For the last ten years, there has been an option to continue using my-hacks.php. Following the WordPress philosophy Decisions, not Options, as of today, WordPress trunk no longer supports the use of a my-hacks.php file. The option has long been removed from the admin and now the file will not be loaded.  This is a breaking change for sites that still use a my-hacks.php file.

If you are using my-hacks.php, now is a great time to convert that code into a proper plugin. For the last number of years, the file has been loaded just like any other plugin. To change your my-hacks.php file into a plugin you need to do three steps:

  1. Move the file from the root of your install into the plugins folder which defaults to wp-content/plugins
  2. Add the plugin file header comments to the file
  3. Activate your new plugin

This change is associated with ticket #33741.

#4-4, #breaking-change, #dev-notes, #my-hacks-php