Having a copyright notice somewhere on your pages is always a good idea.
However to keep the copyright notice valid and ensure that your site looks professional, it needs to be updated each new year.
With the little trick in this post, you can insert a small piece of PHP that automatically updates your copyright text in your website or WordPress powered blog.
Automatically update copyright text
The basis of this little trick is the PHP date function.
If you use the PHP syntax: date(‘Y’), PHP will output the current year (based on the date in the hosting environment). With this knowledge, you can easily build a small piece of code that automatically updates your copyright text:
Copyright © 2007-<?php echo date('Y'); ?> yourwebsite.com.
With this little trick you can spend 5 min to ensure, that your PHP site or WordPress based blog is always having a updated copyright text.