So, you want to remove the date from your WordPress post URLs? I get it. Those /2025/08/01/sample-post/
URLs that you get when you set up WordPress are long and not very user-friendly.
The primary reason for removing the date from WordPress URLs is that when you update a post, what should you do? Leave its URL looking old? Move it to the new one, and worry that the links to that post will break?
In this guide, we cover how to change a WordPress permalink, or URL, structure to remove the date from it.
How to Remove the Date From WordPress URLs
Changing the structure of URLs (permalinks) in WordPress is actually very easy. Here’s how to do it:
- In your WordPress admin dashboard go to Settings->Permalinks
- Select the permalink structure that will work best for your website or enter a custom structure. In most cases, you’ll want to use Post name.
- Click Save Changes

That’s it! That’s how easy it is to remove the date from WordPress URLs.
⚠️ But here’s the problem… While it’s this easy to change the structure of your WordPress URLs, it will cause your WordPress site to show 404 errors at your old URLs.
What’s wrong with that? It will tank the SEO of the site you’re working on. All those URLs with dates in them will stop working and Google and search engines will no longer be able to access the content of that page. This will make those pages no longer show in search results.
Of course, if you’re starting a new WordPress site and have no content published yet, then this is not a problem you should worry about. But if your site already has some content that is indexed by search engines, you should take some next steps to ensure that your links will continue working.
Setting Up URL Redirects
To avoid the scenario described above, you’ll want to set up redirects so that your old URL with the date in it now automatically redirects to your new URL without the date in it.
The easiest way to do this is to use a redirection plugin, like Redirection. We have a dedicated guide explaining how to set up 301 redirects with this plugin.
The other trick we’ll cover here to avoid generating 404s on our site: we’ll do our URL rewrites with .htaccess
files. Use this method only if you’re comfortable with adding custom code to your site.
WordPress URL rewrite with .htaccess
Here’s a video explaining how I change the permalink structure for a WordPress post, and make sure that I forward all the traffic from the old URLs to the new ones:
Here’s the code, which you’ll typically put in a file called .htaccess
which will be at the root of your WordPress site’s file system:
## To change example.com/2019/01/01/post-slug to example.com/post-slug
<IfModule mod_rewrite.c>
RewriteRule ^([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ /$4 [R=301,NC,L]
</IfModule>
Code language: HTML, XML (xml)
The really important thing about this code: it requires that your WordPress server be running “Apache” not “Nginx,” and that your Apache configuration supports .htaccess
files for URL rewrites.
This didn’t work for me. It just did nothing at all. Why, I wonder… ?
THX! This also works with LiteSpeed servers. At least it worked for us 🙂
I am using the free version from wordpress.com and I cannot find the permalink option. Does this only work for those with their own domains or upgraded plans?
I am trying to do that for my blog but getting 404 error on some posts. Don’t know how to restore that.
Can I anyone let me know about 504 error. I face this error several times I talk to server team but they don’t fix
Hi, I’m into similar issue but I cannot locate htaccess in my wordpress site. Please suggest as I tried to locate it in SEO -> tools -> file editor. htaccess does not exist at this location.
its only for apache , can anyone help me as how to use this with Nginix (my blog is launched on AWS cloud so i am using cloudfront and nginix)
Hi,
Guide to Remove the Date from a WordPress Post URL
I don’t know this before when search it on google i have found your website at here and read your written article and try to change my self then i have done after apply it on my website.
Thanks a lot for your beautiful article.
Hi,
Step-by-Step Guide to Remove the Date from a WordPress Post URL
I don’t know this before when search it on google i have found your website at here and read your written article and try to change my self then i have done after apply it on my website.
Thanks a lot for your beautiful article.
1. Do you think you’ll ever write advice for those of us who have an nginx-based managed Word Press server like Liquid Web (whom you recommend)?
2. I have over 3000 posts on my site going back to 2012. All were crested using the date/slug format. I have a plug in by Yeost that will create a redirect for individual posts on which I change the URL, but it doesn’t support bulk changes. And WP tells me(as I understand it) that changing my URL settings is retroactive, therefore would cause 404 errors on every past post. Is there a solution you know of that could handle creating redirects for all of my posts in one fell swoop? As above, it would have to be usable on an nginx server. Maybe this could be a subject for a future post?
Hi Felicia,
Great questions! We don’t know a ton about writing nginx rules ourselves, so our solution on nginx-based hosting environments (e.g. WP Engine uses nginx reverse proxy) has been to get a tech support person on the line, explain exactly what we’re looking for, and not hang up the phone until the resulting redirects work properly . Have you tried that? 🙂
Thank you for this tutorial.
I tried changing my permalinks before, the result was not good. I had so many 404 errors but I couldn’t figure out what was wrong. However, I have just done it again following your guidance, and it as worked well.
Thanks for the .htaccess code.
Great! Glad it helped you 🙂
when i change the permalink settings only the date disappear from a post link without edit “htaccess” file
why this ?