John Chow dot Com Free WordPress Installation - Start Your Blog Today!
 

How To Auto Update The Copyright Notice

written by John Chow on January 2, 2009

Profit from binary options

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. :)

Did you enjoy this post? Get John Chow Dot Com updates via email...

Stay up to date with all of John Chow’s tips for making money online and blog posts by subscribing via email. Your email will be kept private and never shared with anyone.

Comments have been disabled for this post.
Sort: Newest | Oldest

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

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.

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);
}

John,

Thank You for this good news.

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!)

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.

"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.

dang dude you're smart

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

John,

Simple, yet effective tips.

Cheers!

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

It is good for big companies.

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.

PHP footer is key - gotta update that stuff in BULK hehehe

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 ",";
}

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

i think i ll do this now

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

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

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

Great tip. Though I use Year-present.

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

I think most of templates now already have this automated feature, however it was already on my theme :P

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.

all templates should have this feature

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.

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

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

thanks this has been helpful

Good tip, thanks!

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

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.

This is something i have to get round to doing.

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.

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!

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.

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

Just imagine! That' s so easy.

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

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

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

I've now read this at over a dozen blogs.. :)

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

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.

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

Thanks for this John.. I'll add it today! :) Cheers!

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.

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

to:

(Proper single quote in front of the Y).