All About Web Co. logo
All About Web Co.

How to Automatically Update the Copyright Year in WordPress

Author: Serhiy Manuilo, Publication Date: Feb 18, 2024, Last Updated: Jun 15, 2024
by Serhiy Manuilo, Jun 15, 2024
The article image: "How to Automatically Update the Copyright Year in WordPress"

Many website owners experience the same problem yearly and it’s an outdated copyright year. Fortunately, there’re several ways to automate it in WordPress and eliminate the problem forever.

To update the copyright year automatically in WordPress with a plugin, install and activate the “Auto Update the Copyright Year” plugin. Navigate to Appearance > Editor > Footer, add the Shortcode block to the footer and use [cr_symbol] and [cr_year] plugin variables as part of your copyright notice.

To auto update the copyright in WordPress with custom code, navigate to Appearance > Editor > Footer > Edit, click on the ”+” button and add the Custom HTML block. Then add a script (you can find it below) to retrieve the copyright year text and replace it with the current year using the “new Date().getFullYear()” JavaScript code.

Right before we start: This article describes how to change the copyright year dynamically on the WordPress platform according to its specifics. If you want to learn more about the subject, this guide covers it in general. If you’re not a WordPress site owner, you may be interested in reading similar guides for the following site builders: Squarespace, Wix, Webflow, Weebly, Blogger.

There are many plugins that can do the job. I want to show you two of them that are the best, in my opinion.

Let’s start with Auto Copyright Year Updater. To dynamically change the copyright year with this plugin, you need to add the copyright notice using the Shortcode block (After) instead of the Paragraph one (Before).

Before: Paragraph + © 2020-2024 allaboutweb.co

After: Shortcode + [cr_symbol] 2020-[cr_year] allaboutweb.co

The main advantage of this approach is that you decide how to use the variables, and the downside is that you have to utilize the Shortcode block, which sometimes might be not the best option.

Follow these steps to configure it:

  1. Navigate to Plugins > Add New Plugin
  2. Search for the Auto Copyright Year Updater plugin
  3. Click Install Now and Activate the plugin Install and activate the Auto Copyright Year Updater plugin in WordPress
  4. Navigate to Appearance > Editor Navigate to the WordPress theme editor
  5. Search for Footer Search for the Footer block of a WordPress template
  6. Click on the Edit button Edit Wordpress footer block
  7. Remove current copyright notice if you have any, and add the Shortcode block
  8. Enter your copyright notice but replace the copyright symbol and current year with the plugin variables. For example, Copyright [cr_symbol] 2020 - [cr_year] allaboutweb.co Add the Shortcode block with copyright variables in WordPress
  9. Save the changes

Here’s the result:

Wordpress copyright notice with dynamically changed year

Ok, now it’s time to try out another plugin called Dynamic Copyright Year.

The difference with the previous plugin is that this one does the job for you right after you install and activate the plugin. No need to use a special block or variables. Just make sure you have the copyright notice with the year in place.

Follow these steps to set it up:

  1. Navigate to Plugins > Add New Plugin
  2. Search for the Dynamic Copyright Year plugin
  3. Click Install Now and Activate the plugin Install and activate the Dynamic Copyright Year plugin in WordPress
  4. If you already have a copyright notice with the year(s), YYYY or YYYY-YYYY format, it should work immediately. If you don’t have it yet, navigate to Appearance > Editor Navigate to the WordPress theme editor
  5. Search for Footer Search for the Footer block of a WordPress template
  6. Click on the Edit button Edit Wordpress footer block
  7. Click on the ”+” button and search for Paragraph and add the block Add the Paragraph block to the WordPress site footer
  8. Enter your copyright notice with a single year © 2020 allaboutweb.co or a range of years © 2020-2023 allaboutweb.co
  9. Save the changes

Here we got the same result as before:

Wordpress copyright notice with dynamically changed year

There are many other plugins you can find on WordPress. I showed you the most popular ones that take different approaches. IIn the end, you are free to use whatever plugin you like. It won’t significantly differ from what I explained in the two sections above.

WordPress has a huge ecosystem, which helps us to fulfill any of our needs.

However, over time, you might end up having a bunch of plugins that may block or slow down the migration to the next WordPress version, conflict with each other, or even bring security threats to your website.

Fortunately, there’s a way to implement it without plugins, and the Custom HTML block can help us. Even though it requires some coding, it is still quite simple.

I must mention that the method I show you is not considered as best practice. It is worth changing the theme source code or use plugins/tools to edit the functions.php file to properly do this.

But not everyone can or ready do this. Let’s stick with the easier option for now.

Follow these steps:

  1. Navigate to Appearance > Editor Navigate to the WordPress theme editor
  2. Search for Footer Search for the Footer block of a WordPress template
  3. Click on the Edit button Edit Wordpress footer block
  4. Click on the ”+” button and search for Custom HTML and add the block
  5. Enter the following code
    <p>Copyright &copy; 2020-<span id="copyright-year">2023</span> allaboutweb.co</p>
    <script>
      const copyrightYearElement = document.getElementById('copyright-year');
      
      if(copyrightYearElement) {
        copyrightYearElement.textContent = new Date().getFullYear();
      }
    </script>
    Custom HTML code that automatically updates the copyright year in WordPress
  6. Save the changes

To get the copyright symbol for plain text use the MacOS shortcut Option + G or the Windows shortcut Alt + 0169. For the HTML code, use one of the following entities: &copy;, &#169;, &#xA9;.

Alternatively, you can copy it from here ©.

Check out this post to learn more about the copyright stuff: Copyright Footer - Examples, HTML, Symbol, Format and More

This is a copyright notice format formula:

[1] Copyright [2] © [3] YYYY or YYYY - YYYY [4] Entity name [5] Rights statement

  1. The “Copyright” word (Optional)
  2. The copyright symbol © (Required)
  3. Current year 2024 or a range of years 2022 - 2024 (Required)
  4. An entity name (Required)
    • An author’s full name
    • A company name
    • A website domain name
  5. A rights statement (Optional)
    • All rights reserved
    • Some rights reserved
    • No rights reserved

Copyright notice examples:

My personal preference is the last one: “Copyright © 2024 allaboutweb.co”. Although you are free to use any format you like or consider valid in your particular case.

Summary

WordPress provides a broad spectrum of methods to automatically update the copyright year. I showed a few of them, the easy ones. None of them takes more than 10 minutes of work. Don’t hesitate to implement this, so you have one less thing to remember.