Updating the copyright year on your website may not be a legal requirement, but it's smart marketing. Showing the year is especially important if you have a site without dates on its content.
You first need to take another step to make the php script run on html pages. If you're using Word Press, you don't need to edit the .htaccess file.
You can skip straight to the Copyright That Spans Several Years section below.
Click Save, then go back and make sure the editor didn't add an extension to the filename after .htaccess. Upload the .htaccess file to the root directory of your website.
This is the topmost folder of your website's file structure and is usually named or example.com/home.
Entering either script won't change the year in the Design view of your html editor.To see the results of entering your script, upload the edited web page to your web server, then go to your browser and reload the page. Copy and paste it wherever you want the current year to appear: Yes, the php script is simpler, but it may not work just yet. It's actually a good thing, because then you'll be able to run other php scripts on your site, which can be extremely useful.