Since it came online iGuRu.gr we used permalinks that contained the date and title of the post, like the link below:
https://iguru.gr/2021/06/06/sample-post/
Today we decided to remove the date and leave only the title of the post.
Why
Because there is no reason anymore. Google used to ask for permalinks that contained the date and a random number to show the site's posts in Google News . Later he got the random number back, and shortly after that he got the date back. The date is anyway present in the structured data of each publication.
Below we will see how you can change the type of permalinks.
You will need a coffee, and the Redirection plugin.
From the Settings / Permanent Links page (https://domain.name/wp-admin/options-permalink.php) change the links to the format you want:
In the case of iGuRu.gr we changed from "Day and name" to "Article name".
After the change you will have to make some changes. First the internet is full of your articles with the old links, and so in case someone clicks on a link the 404 will appear.
So do it installation and open it Redirection plugin. You need to add a redirect that will do the job for all the links in your database.
We will use regex:
Source URL: ^/\d{4}/\d{2}/\d{2}/(.*)
and
Destination URL: /$1
In case you use a different permalink format from "Day and name" see also the following regex:
Redirect date, name, and category permalink
/ 2020/01/02 / category / post-name ⇒ / post-name /
Source URL: ^/\d{4}/\d{2}/\d{2}/.*?/(.*)
Destination URL: /$1
See above from here
Finally before closing we should mention that if you are using xml sitemaps, you should disable and enable it Plugin to create new links. This will be very helpful for Google indexing. If you don't do it sitemap your will contain the old links.
Caution: If you are interested in your Google ranking, do not try to change permalinks.