How To Automatically Update Your WordPress Copyright Date

Posted By on Jan 4, 2010 | 12 comments


copyright-symbolIt’s that time of year again. No, I don’t mean time to make resolutions for the new year or to plan out your business strategy for the next twelve months. It’s time to update the copyright date on your websites. Well, if you use WordPress you can fix this issue now so you will never again have to mess with changing your copyright date.

Many WordPress themes include a copyright date in the footer. The problem is that they only list the current year. However, a proper copyright date should cover a range of years beginning with the first year your website went live. For example, if your blog started in 2005, your copyright should cover 2005 through the current year. To fix your copyright date so that it contains the proper date range and automatically updates at the beginning of each year, just place the following code in your footer.php file:

&copy; Copyright 2005–<?php echo date('Y'); ?> <?php bloginfo('name'); ?>. All rights reserved.

Replace 2005 with whatever year your website started. You may also replace <?php bloginfo('name');?> with your domain name or the legal name of your company if you wish, so you may end up with something like this:

&copy; Copyright 2005–<?php echo date('Y'); ?> My Company Name, Inc. All rights reserved.

If you want to see how it looks, just scroll to the bottom of this page and look at the copyright in the footer. With this code in your footer, you’ll never have to worry about updating your website copyright date again. Happy New Year!

12 Comments

  1. Thanks for the heads-up! I was trying to find this article.

    Post a Reply
  2. shawn, do you already include this in the setup, or should I go back in and alter each one of mine? thanks, jenny

    Post a Reply
    • Jenny, you’ll have to add it to each site’s footer. It’s not included in any of the setups because there are so many themes to choose from and I wouldn’t know what year the client started their blog. If you have any trouble inserting the code, just let me know.

      Post a Reply
    • Thanks John. You can also change the ‘Y’ to ‘y’ in the code above and achieve the same result for WordPress sites.

      Post a Reply
  3. still works. thanks. just remind people to backup their footer.php or the custom code when they update their theme cuz they’ll likely lose it if they don’t.

    Post a Reply
    • Thanks for the link Damian. The code in this article already includes the ability to do date ranges. I took a look at your snippet and it does automatically compensate for the issue of what to do when in the first year you want it to say “2012” but for following years you want it to automatically switch to “2012-2013″ so that will be a nice improvement for people just starting their websites. However, it is also many more lines of code than what was discussed above so unless you are just starting your website, it is more code than you need. I always like to keep things simple if possible. It’s just less opportunity to screw something up. :-)

      Post a Reply
  4. Interesting, we don’t use WordPress but are going through a revamp at the moment so will look into it as it seems like the best platform. Useful info in case we do, thanks

    Post a Reply
  5. Dear Minja Blog Setup:

    Thank you SO much for the copyright solution! I knew fixing that problem had to be fairly easy, but I spent A LOT of time searching unsuccessfully for something that would work. None of them did until I ran across your copyright solution!

    Thanks again for your valuable help!

    With kind regards,

    Dr. Miles Whitley
    Dr.Miles@Live.com

    Post a Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>