Preparing your websites for the New Year or revising the content? Feel like updating of copyright year is a monotonous and tedious task? Look at some of the approaches for updating copyright year automatically without hassle!

The Website Copyright adds ownership to the site content and it is crucial to reinstate it every year. An updated copyright not only shows that the site is maintained but also gets it rated high on SEO search lists. An annual task for all website owners is to update the copyright year across websites. As a webmaster, you may find it a frustrating task to do it on time year after year. Let us explore some of the ways to auto update the copyright year on a website.


Website Copyright

The Copyright information on a website provides useful information about copyright ownership on the website content. It establishes the creator of that content and also the year the content was originally created. The Website copyright protects the owner‘s rights to the content, logos, images on the website.

The Copyright can be a single year which is the year the site was created. A range of years specifies the year of publishing through the year the content was last revised. If your website has been up for more than a year then it is advisable to show the date range instead of the current year.


Why Should You Update the Copyright Year?

Copyright information establishes your right over the content on your website. It is also important legally if you face the issue of content stolen from the website. An outdated copyright will no longer uphold your ownership of the site content making it vulnerable to thefts.

Displaying the correct range on the website copyright gives an idea of the time period the business has been running. An outdated copyright year would give a perception that the site is not maintained and information might not be accurate. An updated copyright helps establish visitor trust and strengthen the image of the site.


Format of Website Copyright Year

The Copyright information for a website is generally embedded in its footer. The information usually consists of three elements:

  • The symbol ©, the word “Copyright,” or the abbreviation “Copr.”;
  • The year of launch or range since launch year of the website
  • The name, abbreviation, designation of the copyright owner.


How to Update Copyright Year?

The website footer element contains the current year or range of years for which the website’s copyright is valid. You should auto-update copyright year annually either manually or dynamically using a script or CMS.

  • Static Date Rewriting: You can manually update the copyright year on multiple web pages using a web authoring tool like FrontPage or Dreamweaver. The tool enables you to search and replace the old year with the current year.
  • Server-Side Scripting: You can add a PHP, JavaScript, ASP or Perl script to the server hosting the website. The scripts auto update the copyright date before loading the page.
  • Client Side Scripting: Scripts can be set up to run on the client machine using methods like JavaScript and Flash. This query the client machine for the current year. This is used to update copyright year while the website is being loaded.


How to Create a Dynamic Footer Date?

The primary requirement to generate the footer date dynamically is to be able to get the current year correctly. Following are some examples of code to retrieve the current year:


  • Get Current Year in PHP

php echo date(Y);?>


&copy;<? echo date(Y);?>


  • Get Current Year in JavaScript

<script type="text/JavaScript"> var theDate=new Date() document.write(theDate.getFullYear()) </script>


Here are some more alternate time-stamp display formats for both PHP and JavaScript. You can choose what fits better with your design.

  • F j, Y g:i a – February 08, 2016 12:50 pm
  • F j, Y –February 08, 2016
  • F, Y –February, 2016
  • g:i a – 12:50 pm
  • g:i:s a – 12:50:48 pm
  • l, F jS, Y – Wednesday, February 08, 2016
  • M j, Y @ G:i – Feb 08, 2016 @ 12:50
  • Y/m/d \a\t g:i A – 2016/02/08 at 12:50 PM
  • Y/m/d \a\t g:ia – 2016/02/08 at 12:50pm
  • Y/m/d g:i:s A – 2016/02/08 12:50:48 PM


Methods to Auto Update Copyright Year

Most of the websites these days are being built on WordPress or some other Content Management System. Earlier systems, however, continue to be on HTML websites. As such we take a look at the options available for the auto update of copyright year for both HTML and WordPress websites.


Auto Update Copyright Year in HTML

HTML websites need either a server-side or a client-side script to be able to display customised footer with the current date. Listed below are some pieces of code that you can add to your HTML code to auto update copyright year.



Edit the HTML for the website to add PHP code that displays the current date in the copyright.

To add Simple date:

<?php echo date("Y"); ?>

To add Range of years:

<?php$fromYear = 2010;

$fromYear = 2010;

$thisYear = (int)date('Y');

echo $fromYear . (($fromYear != $thisYear) ? '-' . $thisYear : '');?>



Edit the HTML for the website to add JavaScript code that displays the current date in the copyright.

To add Simple date

<script type="text/JavaScript">

document.write(new Date().getFullYear());


To add Range of years

2010<script>new Date().getFullYear()>2010&&document.write("-"+new




Replace the Year in the footer files with the following:

{%now "Y"%}



Change the footer date year in your Node.js by using the following code:

new Date().toISOString().substr(0,4)


ASP.NET (dot Net)

For Classic ASP or the ASP.NET websites replace the year in all the files or the common footer file with the below code:

Copyright @@ @DateTime.Now.Year


Auto Update Copyright Year in WordPress

WordPress themes define the footer format that would be displayed on the web page. The theme needs to be customized to edit the footer display option for copyright information. For client and server side scripting, the ‘footer.php’ file needs to be modified with the auto update copyright code. You are advised to take a backup of this file to handle errors that can stop the footer or website from loading correctly.

Listed below are steps to follow to update the copyright image and get results.



The PHP script is executed from the server-side. Note that this would lead to additional processing during the loading of your page.

  • Step 1: Go to WordPress Dashboard.
  • Step 2: Select Appearance > Editor Menu to edit the active theme.
  • Step 3: On the right-side select “Theme Footer” to open the ‘footer.php’ file.
  • Step 4: Add the PHP code to get the current date as shown in below.

Auto Update Copyright Year html websites

  • Step 5: Click Update File and reload page to view changes

Auto Update Copyright Year website



The JavaScript code is run on the client side after the page has loaded. To update the copyright year automatically add the below code to the WordPress theme footer.

  • Step 1: Go to WordPress Dashboard.
  • Step 2: Select Appearance > Editor Menu to edit the active theme.
  • Step 3: On the right-side select “Theme Footer” to open the footer.php file.
  • Step 4: Add the JavaScript code to get the current date as shown in Figure 3.

Auto Update Copyright Year javascript code

  • Step 5: Click Update File and reload page to view changes.

Auto Update Copyright Year javascript wordpress website


Using WordPress Plugins

The scripting methods require manual addition of copyright update code to the ‘footer.php’ file. The WordPress plugins remove the need to do any manual effort. These provide a viable option to non-coders who want an easy to use the method to update copyright year for multiple websites. Here we look at two of the most useful WordPress plugins to auto update copyright year.


Automatic Copyright Year Plugin

The Automatic Copyright Year plugin enables you to always have an up-to-date copyright for multiple websites. Follow the steps below to add dynamic copyright year to the web page.

  • Step 1. Add a new Text widget to the web page.
  • Step 2. As shown below, add the tag ‘<span>[wpsos_year]</span>’ to the widget. You may also optionally add it inside the footer element in the HTML file.

Auto Update Copyright Year wordpress plugin

  • Step 3. Reload the page and preview the copyright information.


Auto Update Copyright Year using wordpress plugin

The plugin searches the content of all the widgets and the HTML footer tag for the tag <span>[wpsos_year]</span>. It then replaces all the occurrences of the current year number.



The copyright information is an important element of website design. As the website content is updated, the copyright also needs to be updated with the current year information. However, it is a hassle to remember and update the complete list of websites that you need to maintain. For experienced designers, this mundane task can be fulfilled by adding PHP, JS or HTML code to the website. For the newbies, TemplateToaster, a web design software eases the work considerably. The tool is a comprehensive web design software that provides support for all WordPress plugins. As such it can be used for all the functionality that plugins provide to auto update copyright year information on a website.