XF 1.5 Create 2nd site from just one forum

ibaker

Well-known member
One of the forums in my site has grown to be worthy of having a separate site in its own right. Currently that forum has several thousand posts in it. I am wondering what is the best way to create that separate site with just that forums threads and posts, just the attachments that have been added to those posts and just the users that have posted in that forum's threads?

I have thought to take a copy of the existing site and try and strop down but that is a mammoth job and will not end up being clean, especially the attachments and users. I also thought of creating a new site from the ground up but then how would I just import the threads, posts, attachments and just the users that have contributed to those threads.

Any advice?
 
The simplest way would be to duplicate the site then delete any unwanted forums/threads/users from the duplicate installation.

Anything else would require a custom importer.
 
Thanks Brogan but that is causing enormous problems with attachments as deleting existing forums which deletes all threads and posts at the same time leaves the database and file system very dirty as it doesn't delete the attachments.

I did the following:
1. Deleted all forums and categories, one by one, with the exception of the Off Topic forum that I wish to keep
2. Deleted all categories in XF Media
3. Deleted all Albums in XF Media (this left no entries in the XF Media tables)
2. Ran all the crons
3. Rebuilt the caches
4. Mass deleted all users that had 0 posts (as the only posts that current users had made that were left with a post count were those that had posted in the Off Topic forum)
5. Checked the Attachment table in the db and it contained many entries for user ID 0
6. Checked the attachments in the file system and it still contained attachments from deleted posts

All in all a very dirty and bloated installation of XF
 
Maybe that's what the code now says but in reality, in my case it doesn't as I am proving with my install. This install began with the very first release of XF and whilst it is now updated and updated etc. to the current version I can remember a time that there was a bug in that, or the code to do that was later added. No matter what has happened in the life of XF I am seeing the reality of this issue today
 
So the attachments in conversations remain even though the users don't exist any more plus the huge mismatch in the database showing UserID 0 and the other table, plus the mismatch to the number of attachments contained in the XF backend Attachment list not to mention the attachments in the file system that are not even listed in the attachment tables.
 
Attachments can exists from guests. There's nothing inherently wrong with that. As Brogan mentioned, those conversations may still be valid and thus the attachments should exist. If you want to get rid of them, you can use the attachment browser in the control panel to delete them.

As a note, your screenshot of the xf_attachment_data doesn't show the attach_count column. If that is 0, then what you're seeing is totally expected. It means those attachments will be cleaned up over time.

An alternative approach to the whole thing would be an XF-to-XF import, skipping any steps you don't think are relevant. Note that you'll still need to prune all the threads in different forums and limit the users to those that have posted, but you can skip importing conversations, profile posts, etc.
 
An alternative approach to the whole thing would be an XF-to-XF import, skipping any steps you don't think are relevant. Note that you'll still need to prune all the threads in different forums and limit the users to those that have posted, but you can skip importing conversations, profile posts, etc
Thanks Mike, sounds like a much better way, cleaner and with higher quality in the end result...thanks again Mike
 
Back
Top Bottom