WordPress GuidePost → Date Format

WordPress Date Format: How to Change Date and Time Formatting

Three lively women who work in the WordPress industry in a meeting about website performance

Want your posts to display the date exactly how you like—long-form, numeric, or something custom? WordPress gives you full control over how both dates and times appear across your website. 

Let’s walk through how WordPress handles date and time formatting, where to change those formats, how to apply custom styles, and what to do when your changes don’t show up. We’ll also cover plugin options, localization, and advanced theme editing techniques.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

Default date and time settings in WordPress

WordPress uses date and time in post metadata, comment timestamps, archive listings, widgets, and anywhere else content is published chronologically.

By default:

These formats are built on PHP’s date() function, so anything that works in PHP formatting will also work in WordPress.

How to change date and time format in WordPress

You can change how dates and times appear on your site directly from the WordPress dashboard.

1. Access the General Settings menu

2. Choose a pre-defined format or create a custom one

You’ll see radio buttons for common formats, plus a “Custom” option where you can enter your own format code. Here are a few examples:

To create your own, use PHP’s date format reference as a guide.

3. Save changes and check your site

Click Save Changes to apply your new format. In most themes, this will immediately update your post and comment timestamps. If it doesn’t, your theme might be overriding the default (more on that below).

Common date and time format examples

Here are common formats people use, along with why you might choose them:

How to change date format in theme templates (advanced)

If your theme doesn’t respect the format from Settings, you can override it in the template files.

Using the_date() or get_the_date()

These template tags control how dates are displayed in your theme:

You can add a custom format like this:

Changing the format in templates like single.php or index.php

Always use a child theme to make these changes so you don’t lose them during updates.

For block themes using FSE

In full site editing (FSE) themes, date formatting is usually controlled through the block editor or theme.json. Some blocks (like the Post Date block) have format options built in, while others require template editing.

Using plugins to change or extend date formats

For more flexibility, plugins can help insert or manipulate dates without editing code.

Localizing date and time formats

Localizing your date and time formats makes your site feel more natural and user-friendly to visitors from different regions. Your site’s language and region settings can affect how dates and times appear.

Why your date format isn’t changing (and how to fix it)

If you’ve updated your settings but nothing changes, try these fixes:

Bonus: show relative dates like “2 days ago”

Some sites display dates in a dynamic, human-friendly format. WordPress can do that too.

Use a plugin

Some sites display dates in a dynamic, human-friendly format. WordPress can do that too.

Use a PHP snippet

Add this to your theme:

echo human_time_diff(get_the_time(‘U’), current_time(‘timestamp’)) . ‘ ago’;

This shows how long ago a post was published.

Ready to get started?

Get the fastest, most secure WordPress.org hosting on the market.

Image

Aaron Binders works as a Linux Support Technician at Liquid Web and focuses on resolving server-side customer issues. When not spending time with his family, he has a passion for sports such as football and boxing, as well as reading the latest ICT magazines.

Trust us to help you choose the ideal hosting solution

Loading form…