How To Automatically Update Your WordPress Copyright Date

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!

If you liked that, check these out!

Tags: ,

7 Responses to “How To Automatically Update Your WordPress Copyright Date”

  1. Paul Cunningham 06. Jan, 2010 at 9:01 am #

    Nice easy one for even novices to edit into their theme, makes for a great tip!

  2. Tony 08. Jan, 2010 at 1:56 pm #

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

  3. Jenny 09. Jan, 2010 at 4:17 pm #

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

    • Ninja Shawn 09. Jan, 2010 at 6:25 pm #

      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.

  4. John Crumpton 18. Jan, 2010 at 5:49 am #

    And if you’d like a cleaner footer with just the last two digits of the year, ie 2005-10 see:
    http://www.johncrumpton.com/copyright-notice-with-current-year/

    • Ninja Shawn 18. Jan, 2010 at 9:22 am #

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

Leave a Reply