How to Automatically Update the Copyright Year in Concrete CMS

How to Automatically Update the Copyright Year in Concrete CMS


Dec 27, 2024
by jessicadunbar
in DevOps

If you've ever forgotten to update the copyright year on your website, you're not alone. That little detail, often at the bottom of the page, can easily be overlooked during site updates. But what does it say to your visitors when they see an outdated year? It might make them wonder if your site is still active or maintained.

Why the Copyright Year Matters

A current copyright year signals to visitors that your site is active and maintained. An outdated year can leave people wondering whether your content or services are still relevant.

But let’s face it—manually updating this every January can become a chore, especially if you manage multiple websites. That’s where Concrete CMS’s dynamic capabilities come in handy.

The good news is, if you're using the Atomic Theme, you don't even need to lift a finger—it handles the copyright year update automatically for you. No more worrying about remembering to log in at the start of the year to make the change!

For everyone else, let’s walk through how to automate this small but essential task manually, so you can focus on celebrating the new year without stressing over your site’s footer.

How to Automate the Copyright Year in Concrete CMS

If you’re not using the Atomic Theme, don’t worry—updating your copyright year automatically is still simple. Here’s how to do it step by step:

1. Navigate to Your Theme Files

Log in to your server or hosting platform using your preferred file manager or SFTP client. Locate your theme’s folder. This is typically found at:

application/themes/yourtheme/elements/footer.php

2. Edit the Footer File

Open the footer.php file in a text editor or your IDE. Look for the section where your copyright information is displayed. It might look something like this:

<p>© 2024 Your Company Name. All rights reserved.</p>

3. Replace the Static Year with Dynamic PHP Code

Replace the static year (2024 in this example) with the following dynamic PHP snippet:


  <?=t('Copyright %s. ', date('Y'))?>

    

This code automatically fetches the current year using PHP’s date('Y') function. The t() function ensures the text is translatable if your site supports multiple languages.

4. Save Your Changes

Save the footer.php file and upload it back to the same location on your server if necessary.

5. Clear your cache and Test Your Changes

Clear your site cache from the Concrete CMS dashboard under System & Settings > Optimization > Clear Cache. Refresh your website and verify that the footer now displays the current year.

Quick Checklist for Year-End Updates

Before you celebrate the new year, make sure your website is fully prepped for 2024. Here’s a quick end of year to-do list:

  • Log In to All Websites: Confirm your copyright year is up to date.
  • Review Other Year-Sensitive Content: Are there references to 2024 in your blog posts, promotions, or events?
  • Update Scheduled Posts: Ensure any automated content aligns with the new year.
  • Check Footer Settings: If you’re using a dynamic setup, test it by temporarily adjusting your system date.

By following these steps, your website’s copyright year will always stay current automatically, ensuring a professional look without any manual intervention.

As the year comes to a close, it’s the perfect time to give your website a quick refresh. One small but impactful task is ensuring your copyright year is up to date. Check out our detailed guide on automating this process in Concrete CMS above, and don’t miss our End-of-Year Website Cleanup blog for more tips to keep your site running smoothly into the new year!