I am migrating an old website to WordPress. I have to migrate about 100,000 pages. I have written a plugin which is making use of wp_insert_post
.
I also want to migrate the old URL structure without making use of redirects (because every 301 redirect is said to loose some link power), but use permalinks instead. Whenever I set a permalink which includes a slash (directory structure), the slashes are replaced with '-'. This is the problem.
wp_insert_post(array=>('post_name' => 'slashes/go/there/'));
permalink = 'slashes-go-there-';
Any ideas how i can set permalinks on a individual basis for every single page would be appreciated?
Finally I mangaged to solve the problem. Solution:
Install a wordpress plugin: Custom Permalinks from Sami Ahmed Siddiqui
Writing an entry to metadata to set the permalink:
update_post_meta($wpid, 'custom_permalink', $url);