How to clone posts in WordPress without a plugin

If you want to clone your existing posts for testing or development purposes and you need a plugin-free solution, WP-CLI is the best option for you.

Just with a short command, you can clone any post like this:

$ wp post create --from-post=1

Basically, what you need to do is, setting your desired post ID into the –from-post parameter and WP-CLI is going to create a new post by cloning it.

If you need more complex commands about post creation, you can check this page.