sajad torkamani

Suppose your permalink settings were configured to use the default Day and name option so that you now have many post links with permalinks that look like You might be referencing these links across your site.

Now, you want to use the Post name permalink setting instead so that your future permalinks take the form https://sajadtorkamani/sample-post. Notice the absence of the post date.

You can run a MySQL regex replace against your database. Something like this:

	post_content = REGEXP_REPLACE(post_content, '(https:\/\/sajadtorkamani\.com)\/\[0-9]+\/[0-9]+\/[0-9]+\/', '$1/')
	id = 112;

It’s a good idea to first test your SQL query against a single post to ensure it works as intended. Be sure to check out this post for more tips on how to perform a regex replace safely.

Tagged: WordPress