Redirecting to new Post_IDs after migrating to Wordpress

16 Views Asked by At

We are migrating the project to Wordpress. In the original CMS, there were a lot of tables with different IDs, in Wordpress it will be a single post_id. Since the old link scheme was "ID+post_name", the question now arises as to the correct redirect. Under Wordpress, we will need to check and calculate new IDs of different post_types based on the offsets used in the data migration. Since htaccess arithmetic can be a little tricky, I think it's necessary to use one of the earliest wordpress hooks (probably muplugins_loaded), and do the redirect in php code. Share your experience, how did you do it? Thank you.

0

There are 0 best solutions below