How To Auto Update The Copyright Notice

Many people may consider this a minor issue but from a branding and professionalism level, making sure your blog has the correct year on the copyright notice is very important. Now that we’re in 2009, it’s time to update that notice.

For most bloggers, this is a fairly simple task of logging onto the blog server and editing the footer.php file. The problem is, because this is done only once per year, many bloggers will forget to do it. However, there is a simple way to make the copyright notice update automatically.

All you have to do is FTP into your blog and open the footer.php file. Find the part with the copyright notice and replace it with the following.

Copyright &copy; <?php echo date(‘Y’); ?> Blog Name

Instead of hard coding 2009 into the copyright notice, you replace it with <?php echo date(‘Y’); ?>, which will automatically pull in the year from your server. Hopefully, your server is showing right year. If not, you’ll have to get your admin or web host to adjust the time. In my case, I like to do my copyright from the year the blog started. The code will look like this.

Copyright &copy; 2005 – <?php echo date(‘Y’); ?> John Chow, Inc.

Now, instead of trying to remember to update the copyright notice at the start of every year, the blog will do it automatically. That is, as long as the clock on the server is correct. 🙂


85 thoughts on “How To Auto Update The Copyright Notice”

  1. jtGraphic says:

    That’s exactly what I tweeted back at ya! I guess a bunch of people probably did though?

    1. John Chow says:

      Ya, I got a bunch of tweet back with the code. The funny thing was, I did the tweet to find out how many people know about this.

      1. jtGraphic says:

        Well I’m glad I passed the test 🙂

        1. Nice tip, John.

          I’ll keep this in mind for next year, as I’ve already updated 4 of my sites manually. haha

          1. Why don’t you just fix it now, then you won’t have to next year 😉

      2. Hi John,

        Thanks, I didnt knew about this code, I have already updated my site.

      3. Ben Pei says:

        Lol most of the new themes come with this intact actually..

    2. wow, this is some good info if you are a CEO or the owner of a company. It is also very convient 🙂

  2. Hussein says:

    I think I have already read about this in Kevin’s blog at bloggingtips.com 🙂

  3. Thanks loser! I have been doing it manually for 10 years on one of my sites.

    Just kidding, I’m not that stupid!

    1. Gary says:

      You sure look pretty stupid though! ;

      1. Wow you really turn into an asshole online!

    2. Ben Pei says:

      LOL.. I really enjoy your comments..

  4. SImple, yet useful. I need to use this on all of my blogs. Updating that copyright thing can be annoying.

  5. Thanks for the great tip! Maybe if I coded more php I’d remember more of the language lol 🙂

  6. I’m surprised wordpress doesn’t already do this!

    1. Teknolohiya says:

      Who knows in the future upgrade 🙂 But I believe WordPress is not the one responsible for this. It’s the theme coders.

    2. The only problem I see though is the Y isn’t supposed to have the apostrophes around it.

    3. That because we are talking about footer.php which is inside your theme. So WordPress has literally nothing to do with it 🙂

    4. Ben Pei says:

      They don’t have to I guess.. So many themes come coded already..

  7. Cindy says:

    Great tip about the dynamic date. While it might seem like a small thing to some, an updated copyright date is one of the metrics I use when judging the quality of a web site. I guess that makes me a copyright snob.

    Cheers!

  8. Erin Matlock says:

    Thanks for the tip! I’m still new to PHP, so posts like these are always appreciated. I also had to remove the apostrophes like Steven-Sanders to get mine to work.

    Happy New Year!

  9. Ray Ebersole says:

    Actually I had to remove the first apostrophe, it looks like a backwards Mac apostrophe. My blog spit it out as an error and when I put in the Windows one it works fine.

    Thanks John

  10. uwak says:

    thanks for the tips and advice…..success bfor your john on 2009

  11. game-girl says:

    I always use your experience.

  12. I sure didn’t know about this and yes I had forgotten.

    I’m not that surprise I didn’t think about it since I only started
    blogging like 5 months ago.

    Thanks for the tips, I am starting my ftp program up right this minute!

    -Tobias Fransson

  13. Thanks for this great tip. I actually had this on my to findout how to do list. Thanks again!

  14. I just tried it and after checking with my blog I noticed that I had an ugle
    sort of ? in front of 2009.

    After 1minute of thinking I found the problem.

    Original code:
    Copyright © 2008 – Tobias Fransson.

    The ‘ before the Y in

    is what caused the problem. So Solution was quite simple…

    Copyright © 2008 – Tobias Fransson.

    Allowed it to display nicely.

    -Tobias Fransson

  15. another useful tip!! THanks John!!

  16. BlogPave says:

    Thanks for the tutorial. I am not too lazy to change the copyright, but I might try out your way later. 🙂

    Question: Let’s assume a blog was created in 2008. When the year is 2009, should the copyright statement be: “Copyright (c) 2008 – 2009” or just “Copyright (c) 2009”?

  17. Tyler Cruz says:

    Yup, you need to change it from the code John gave:

    to:

    (Proper single quote in front of the Y).

    1. Tyler Cruz says:

      Oh, nevermind, didn’t display my PHP code 🙁

      1. Your footer code might be html. But I don’t think it matters.. Should work anyway..

  18. Andreas says:

    You have the copyright regardless of what you right. Unless you write that this belongs to public domain or something. Why even have year?
    If you gonna use any date/year use the date of publication.

  19. Thanks for this John.. I’ll add it today! 🙂 Cheers!

  20. Smart move John. I usually manually update this, but at times, manual is better for simple things like this. If the years ever screw up, you may not even know of it.

    -Mike

  21. J.D. Meier says:

    How important is it to even have a copyright notice on your site?

    I thought it’s assumed … or is it just an SOP?

    The only place I thought it makes sense is at the bottom of the feeds so when people scrape, it’s obvious what the original source is.

  22. Cheow says:

    Thanks John for the tips.

    I was about going to log on to my wordpress server to change the copyright date but followed your tweet to your blog to learn about this trick.

    Cheow

  23. wesley says:

    I’ve now read this at over a dozen blogs.. 🙂

  24. instead of trying to remember to update the copyright notice at the start of every year,

  25. wisdom says:

    Useful tip, thanks John, updated, didnt work though with my theme.

  26. wisdom says:

    Well it works if you remove the ‘ and ‘ before and after the Y.

  27. game-girl says:

    Just imagine! That’ s so easy.

  28. I’ve had it done the second way for a while. Makes things easier.

  29. Thanks John!

    Hey, completely off subject, but your opinion matters, and maybe others will weigh in:

    Should I buy a Blackberry or an iPhone?! HELP!

    1. Jim Banks says:

      iPhone definately.

      I even went into a shop to see a few of the new Crackberry’s and they are not a patch on the iPhone.

      If you are a big SMS person or send a lot of emails then maybe, but for reading emails and SMS the iPhone is good.

  30. Rahul says:

    Hello John, firstly plz do correct the following error that i’ve found:

    Copyright © Blog Name
    Copyright © 2005 – John Chow, Inc.

    It should be the following:

    Copyright © Blog Name
    Copyright © 2005 – John Chow, Inc.

    the error is in the (‘Y’)

    again, thanks for this simple trick. cheers.

  31. David Hobson says:

    This is something i have to get round to doing.

  32. Erik says:

    Do U.S. law require a copyright notice? :O

    1. Mike says:

      No you are not required to give a copyright notice, but it is always good practice. If you had to prove the content was your property, server logs and domain whois information could be used in court.

      US Copyright Law states that any work created is protected instantly.

  33. Tyler Ingram says:

    John if you looking to show people PHP code or code in general you should get Dean’s Code Highlighter so that it shows the proper characters like single quotes etc as well as colour codes the syntax

    An example of how to highlight PHP on my blog if you’re interested

  34. BusinessX says:

    I have noticed that a number of themes have included this automatically. So, some people may already be automatic.

    Will have to go my sites and check. Also, like your idea of putting the start year too.

    1. I personally have the start year indicated by my archive set!! I’m looking forward to when my archives go back 4 years like Johns does!! ehehhe

  35. I think most of templates now already have this automated feature, however it was already on my theme 😛

    1. Yup most themes are on that but my site http://www.motorbeam.com/ still shows 2008, just speaking to my host to update their timings.

  36. James Ting says:

    Thanks for the tip. This save me lots of time.

  37. Great tip. Though I use Year-present.

  38. PTCBlogger says:

    Thanks for the tip! I did forget to change the year on my blog, haha!

  39. Graeme says:

    The autodate! – if you were Amazon then you would try and patent that technique.

  40. Pheak Tol says:

    Thanks for the helpful tip. something so small yet so major

  41. SImple, yet useful. I need to use this on all of my blogs.

  42. For some of the website’s I’ve done the client has requested that the footer lists every year since they started business. They say it makes more of an impact for how long they’ve been around.

    PHP code for that:

    $currYear = date(‘Y’);
    $startYear = 2001;
    for ($year = $startYear; $year <= $currYear; $year++) {
    echo ” $year”;
    if ($year != $currYear) echo “,”;
    }

  43. daniel says:

    Thank you very much!

  44. Jim Banks says:

    Wish I had read this earlier. I spent a ton of time going through some huge sites doing a Ctrl F find and replace in Dreamweaver. For some older sites I hadn’t even put in a php footer.

    Thanks for the heads up though.

    1. PHP footer is key – gotta update that stuff in BULK hehehe

  45. game-girl says:

    It is good for big companies.

  46. Ben Pei says:

    Hey there John, simple and a remindful tip to all bloggers out there… Very important detail actually..

  47. Noobpreneur says:

    John,

    Simple, yet effective tips.

    Cheers!

  48. I jsut found out that my blog already has an autoupdating date – great news!! hehehe

  49. dang dude you’re smart

  50. “Hopefully your server is showing the right date”

    Imagine if we could all backtrack a year. This year, could be 2008 all over again! OK, I’m done rambling nothingness. 😉

    Great and useful post though, I’m using the code, since I didn’t even have the copyright notice there at all.

  51. Such a simple piece of code, but I forget to perform this task on every single website I create. Thanks for the reminder John – I’m sure this will be of great benefit to a lot of people.

  52. Nice tip but unnecessary.

    Copyright dates are handy for judging whether a webmaster or site is still active but don’t have much legal relevance.

    The United States (and any other country that’s a member of the Berne Convention) doesn’t require a dated copyright notice any longer.

    I advise readers of my books and blog not to post one at all. It’s too easy to forget to update it and have your site look stale. (Which this tip would solve!)

  53. Kosol Anusim says:

    John,

    Thank You for this good news.

  54. Yeah. I had to do this on several of the sites at my company last week. I opted for the JavaScript version.

    function DisplayCopyright()
    {
    var dteNow = new Date();
    var intYear = dteNow.getFullYear();
    document.write(‘© Copyright ‘ + intYear);
    }

  55. SEO Tips says:

    Very funny that I run in to this post I was considering this actual process this morning and whethers its something bloggers have to do. After reading this I have just finished editing my footer now.

    Glad I read this, thanks.

  56. Nice tip, I got lucky and remembered this year but I may not next year, oh wait I don’t have to now.

Comments are closed.