It all goes back to where you got it, what their copyright is for the items you copied, and if there's a clause that allows you to share. In many cases, the collections you copied from had non-commercial clauses, which means that on a commercial site (like WikiTree) you are not allowed to share at all. In most cases, even if they do allow sharing, it's only if you cite the original source and essentially promote where it came from. As mentioned above, the 3 exceptions are photos you have taken yourself (of non-copyrighted materials), items you have explicit permission to publish, or public domain items.
There are some wiggle-room with what is termed "Fair Use" clauses, where you can utilize a very minor portion of what was copyrighted to demonstrate the key data you are trying to showcase - like snipping a line from a Census to show just the person and their data on an image. But if the source was taken from a site that does not allow you to reuse their images, you cannot use more than what is considered "Fair Use" even in those circumstances. So publishing an entire Census page would be a violation. The only way around it is if you went to the Census office and were able to retrieve your own photograph of the page, since those records are intended for public consumption. So typically it's not the "document" that is restricted, but the time, effort, and often money that was spent in hiring document scanners and indexers to retrieve the images, place them on the website, and index them so that they're usable to the people who go to their website.