◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Post → Date Format
WordPress Date Format: How to Change Date and Time Formatting
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:
- The date format is usually F j, Y (e.g., March 30, 2025)
- The time format is typically g:i a (e.g., 5:15 pm)
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
- Log in to your WordPress dashboard.
- Go to Settings > General.
- Scroll down to the Timezone, Date Format, and Time Format options.
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:
- F j, Y → March 30, 2025
- Y-m-d → 2025-03-30
- m/d/Y → 03/30/2025
- g:i A → 5:45 PM
- H:i → 17:45
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:
| Format String | Output | Use Case |
|---|---|---|
F j, Y | March 30, 2025 | Friendly, long-form style for blogs |
Y-m-d | 2025-03-30 | ISO standard for tech or international audiences |
m/d/Y | 03/30/2025 | U.S. standard for casual or business sites |
D, M j Y | Sun, Mar 30 2025 | Newspaper-style, good for news or editorial |
g:i A | 5:45 PM | 12-hour time with AM/PM |
H:i | 17:45 | 24-hour format, used in Europe and for events |
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:
- the_date() echoes the date
- get_the_date() returns the date for use in code
You can add a custom format like this:
- echo get_the_date(‘Y-m-d’);
Changing the format in templates like single.php or index.php
- Use FTP or your theme editor to access your theme files.
- Find the template where dates are shown.
- Replace the default date function with a custom one using your preferred format.
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.
- WP Date and Time Shortcode – Lets you add dynamic date/time shortcodes anywhere
- Custom Post Type UI – Helps manage post types that may include date formatting
- WPCode – Add custom PHP snippets safely to control output sitewide
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.
- Go to Settings > General > Site Language to set your locale
- WordPress will automatically localize month names, weekdays, and AM/PM if supported
- Plugins like WPML or TranslatePress can manage translations of custom date strings across languages
Why your date format isn’t changing (and how to fix it)
If you’ve updated your settings but nothing changes, try these fixes:
- Theme override: Your theme might hardcode the date using its own format. Open the theme files (like single.php or index.php) and replace any hardcoded the_date() or get_the_date() with a version that uses your preferred format.
- Builder conflicts: Page builders like Elementor may override date display via widgets. Check the widget settings or custom template areas and manually set the format where needed.
- Function mismatch: If the_time() is used instead of the_date(), your settings won’t apply. Swap out the_time() with the_date() or get_the_date() to respect your General Settings.
- Caching: Clear your browser and site cache (especially if using caching plugins). Purge your site cache through the plugin or hosting dashboard to force the changes to appear.
- Plugin conflicts: Disable plugins one by one to rule out conflicts. If a plugin filters or replaces date output, check its settings or disable it to test for resolution.
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.
Next steps for customizing WordPress date format
Changing how your WordPress site displays dates and times gives your content the clarity and polish it deserves. Whether you need a clean numeric format or want to show timezones and weekdays, WordPress gives you all the control you need.
To take full advantage of custom date displays, experiment with both Settings and template-level changes to match your brand’s tone and layout.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy. Liquid Web’s WordPress hosting options configure business-class servers and support plans specifically for WordPress websites.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our WordPress hosting options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
What is WordPress? →
A complete beginner’s guide to WordPress.org
What’s the difference between tags and categories in WordPress? →
Learn the key differences between WordPress tags and categories to better organize your website content.
Beginner’s Guide to WordPress themes →
Learn how they work, what to look for, how to choose, and more
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.