View Full Version : Changing thread ID's to match those of deleted threads
Firyou
10-19-2014, 03:10 PM
I recently had a mistake happen on my forum where a lot of important threads were deleted. I'm in the processing of restoring those threads and I was wondering how I could go about changing the thread ID of a newly started thread to match those of the ones that were deleted?
So for example, a thread ID for 26756 was deleted. I'm reposting a new thread with the contents from that deleted thread and it has the ID of 73612 and I want to change it back to 26756.
tyia
Lynne
10-19-2014, 03:17 PM
I've never tried to do that before, but you would need to change the thread.threadid field as well as the post.threadid for all the posts in that thread. Possibly threadviews.threadid (if that matters to you).
I would strongly recommend doing this on a database backup first. And, make sure you do a database backup before doing it on your live site also.
cellarius
10-20-2014, 05:24 AM
How many threads are we talking about?
I would go the other way round and change internal links to those threads in the database, and for external links establish redirects in .htaccess.
Firyou
10-22-2014, 12:02 PM
How many threads are we talking about?
I would go the other way round and change internal links to those threads in the database, and for external links establish redirects in .htaccess.
Maybe about 30 threads? I tried setting a redirect 301 through .htaccess and I just received a 500 internal server error.
cellarius
10-22-2014, 12:10 PM
For 30 threads, I'd definitely do static redirects in .htaccess. If you're getting server errors, you're doing it wrong, i.e. the redirects are either wrong or conflict with other code present in your .htaccess.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.