Plugins – Is it possible to add permalinks when using wp_insert_post?

I am migrating articles from blogger to wordpress, while uploading, the date part of the link gets changed

For example

this is my old link

https://www.example.org/2020/04/modakirate-mahboudi-khaled-2am.html

I get this link while uploading post

https://www.example.org/2022/01/modakirate-mahboudi-khaled-2am.html

Is there any way to specify absolute link when using

wp_insert_post($post);

Forcibly add /2020/04/modakirate-mahboudi-khaled-2am.html

to permalink

Leave a Comment