Decrypting encrypted WordPress footers

Posted July 22nd, 2009 in Articles, WordPress

Decrypting WordPress footers

More and more theme authors seem to be encrypting their theme footers in order to make sure people keep links back to their website in place. This guide gives a quick and easy method to decrypt such footers so you can customise such templates.

The practice of encrypting footers, in our opinion, goes against the spirit of WordPress as open source software. Not only that but it makes harmless customisation hard – what if, for example, you wanted to add a link to your privacy policy in the footer? Then of course is the security risk of allowing obfuscated code into your themes. For those and a number of other reasons we have decided to ban themes from containing encrypted footers and are now posting this guide to decrypt them.

Legal issues

Before we start decrypting there is a need to take a look at the legal issues of decrypting such footers. A recent blog posting over at the WordPress development blog entitled Themes are GPL too contains a letter from James Vasile from the Software Freedom Law Center. In his letter he states that his belief is that the PHP files of WordPress themes are derivative works of WordPress and therefore should be released under the GPL, whereas the stylesheets, javascript and any other content is not required to be released under the GPL. This would mean that decrypting encrypted theme footers is allowed – however, until this is tested in court it’s all just legal opinions. So, should you decrypt it? A lot of footers contain scary comments such as:

This file is protected by copyright law. To reverse engineer or decode this file is strictly prohibited.

Or even:

To reverse engineering this file could cause you to go to prison for copyright infringement!

In our opinion such warnings carry little legal weight – if any. If the license the theme is released under requires you keep any links in place then you should still be allowed to decrypt the footer however keep any links intact.

Please note: the contents of this article should not be construed as legal advice, we are not liable for any actions you may take as a result of reading this article.

Decrypting the footers

Encrypted footers come in many, many forms and it would be impossible to create a single guide to cover them all – this article aims to help you decrypting the most common types. In actual fact we’re not going to be decrypting anything – to start open the footer.php file of your theme, chances are you’ll find something like this:

Encrypted content

Before the start of the PHP code add the following HTML comment:

<!-- start footer -->

After, add the following comment:

<!-- end footer -->

Save and upload the new footer to your blog and open your blog’s home page, view the source of the page by right clicking and selecting View Page Source (wording may differ slightly depending on browser)

Either by looking or using the Find function (Ctrl+F) look for your HTML footer start comment in the source. Then simply copy the HTML between the footer start and footer end comments:

Copy HTML

Then just paste it back into your footer.php file, overwriting the encrypted code.

You’re almost done – just one last step – add back an import PHP WordPress call above the </body> tag:

<?php wp_footer(); ?>

The contents of your footer.php file should now look something like this:

The final product

And there you have it – your decrypted footer! What you do from here is up to you but remember the terms of the license the theme was released under and whether links are required to be left in place.

5 Responses to “Decrypting encrypted WordPress footers”

  1. Randy says:

    Hi, thanks for the post. I’ve search it over internet pages and this tutorial really simple.
    Anyway, in my opinion, in some cases this ‘cracking’ footer themes will cause malfunction the theme, the best solution is buying the original theme….

    Cheerz
    Randy

  2. neel says:

    Nice and simple trick.. But i want also to learn how to encrypt the footer

  3. Alexander says:

    Superb. Did already some experimentation myself but forgot to copy the import PHP WordPress call

  4. Great !
    that easy way remove foofter link in wordpress
    Thanks!

  5. Leo says:

    thank you very much! that’s quite simple!

Leave a Reply