How to automatically update your copyright year in your WordPress footer

Are you still manually changing the year in your WordPress footer? If so, did you know there’s a quicker and easier way to dynamically show the date in your footer? The method described below will automatically show the current year in your copyright footer.

For this, we need to edit your theme files. Before we do this, ensure you have a backup of your theme files. In case something goes wrong, you can use the backup files to resolve the issue.

In order to add this code, we need to locate the footer.php file within your theme files. I recommend logging into your site using FTP. Find your wp-content folder. Then your active theme directory, and within it you should find the footer.php file. Open the file in a text editor.

If you don’t want to use FTP, you can also locate the footer.php file within the WordPress Dashboard (by going to Appearance > Theme Editor) if your theme allows.

WordPress > Appearance > Theme Editor

Paste one of the following options where you want to display the copyright notice before the closing </footer> tag in your footer.php file.

A) Simple way to show the current year

<p>&copy; Copyright <?php echo date('Y'); ?></p>

Result: © Copyright 2021

B) Simple way to show a date range

<p class="site-copyright">&copy; Copyright 2010 - <?php echo date('Y'); ?></p>

Result: © Copyright 2010 - 2021

C) Showing the current year with your blog name

<p class="site-copyright"><?php printf(__( 'Copyright &copy; %1$s %2$s', 'themeslug' ),date( 'Y' ),get_bloginfo( 'name' )); ?></p>

Result: © Copyright 2021 Blog Title

And there you have it – your footer will now show the current year without you having to make any changes. Play around with the text to display want you want.

Web development and digital marketing services for content creators and solo entrepreneurs

Want to learn more about WordPress?

Post last updated:

Join over 1,000 creators and small biz owners and be part of The Roundup

Ready to build your website, grow your audience and monetise your platforms? Receive the latest WordPress news, social media updates, SEO tips and industry insights straight to your inbox.

By signing up you’ll receive our fortnightly newsletter and free resources. No spam or unnecessary emails. You can unsubscribe at any time.