Update Copyright Date in WordPress: In this quick guide, I will show you how to automatically update your WordPress copyright year using a small PHP code snippet. Once added, your site will always display the current year without you ever needing to update it manually again.
This is especially useful if you want your footer to show a range like "2006–2026" and keep it accurate as time goes on.
Automatically Update Your WordPress Copyright Date
Instead of hardcoding a year that eventually becomes outdated, you can let WordPress handle it dynamically using PHP.
Step-by-Step Instructions
- Log in to your WordPress Admin Dashboard.
- Go to Appearance > Theme File Editor.
- From the Theme Files list on the right, open footer.php.
- Locate your existing copyright text or choose where it should appear.
- Add the following code, replacing 200x with the year you first published content on your site:
©200x-<?php echo date("Y"); ?> <?php bloginfo("name"); ?>
- Click Update File.
- Refresh your website to confirm the change.
Example Output
If your site launched in 2005 and the current year is 2026, your footer will automatically display:
©2005-2026 lancelhoff.com
Why This Method Works
- The
date("Y")function always outputs the current year. - You never need to update the footer again.
- It keeps your site looking actively maintained.
- Works with any WordPress theme that uses PHP templates.
Important Notes
- If you switch themes, you may need to reapply this snippet.
- If your theme uses a footer builder instead of
footer.php, you may need to add the code via a custom HTML block that allows PHP, or a child theme. - Do not edit theme files directly unless you are comfortable doing so. A child theme is recommended.
Final Thoughts
Automatically updating your WordPress copyright year is a small change, but it helps keep your site professional and current. This simple PHP snippet is lightweight, reliable, and has zero performance impact. Set it once and never think about it again.