At my job, I was asked to change hundreds of custom permalinks, it would be combersom to change them one at a time, so I added a function to the file class-custom-permalinks-form.php file to handle inserting from php script calls.
This is a mod to the Wordpress plugin Custom Permalinks.