I have been put in charge of a site that have a lot (and i mean it) of core hacks, some are pretty easy, some are really hard to spot (like removing a do_action on the_content.

So, my question is , how i would and remove the hacks the previous maintaners did, while adding the new features requested.

Should i go and fix as soon as i spot them, or actively search for any hack in the core? (Side-Effect of the core hacks,can not update wordpress or it will completely break and a lot of features will be "removed" effectively putting the site down)


Pull down the copy of Wordpress from your client's server to your local.

Download a clean zip of the version of Wordpress your client has installed. http://wordpress.org/download/release-archive/

From there, you will need to use a file comparison tool (i.e. Diff on Linux). You can also use GIT to find the difference in folders by creating a GIT repo of the hacked Wordpress, then overwrite the files with the new WP and GIT will track them and show you the differences. Github for Mac can make easy work for you.

| improve this answer | |
  • This is a good way to do it, though it will take some time to completely clean the core and convert these hacks into network enabled plugins ... – hacksy Sep 26 '11 at 19:29
  • Good luck! Let us know how it goes. This can be useful for others. – Brian Fegter Sep 26 '11 at 21:57

To add to what Brain said, I think using a visual IDE that shows git/svn changes helps a lot, and also allows you to save all the changes.

Here is a screenshot of what a git compare looks like in netbeans 7.0. ( the git integration is still new but so far seems to work quite well). It works with SVN, CVS, and Mercurial too.

enter image description here

| improve this answer | |
  • 1
    "To add to what Brain said" @BrainFegter :) – kaiser Oct 24 '11 at 16:55
  • 1
    @kaiser I'm flattered by this at this point in my life. :) – Brian Fegter Feb 3 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.