A few of my PCs have died. It happens. But now what? Specifically, now what happens to their items? They are rolling up some new characters and I assume they should follow the character wealth guidelines for their current level, but what is stopping them from locating their corpses and effectively doubling their wealth just like that? How do you deal with dead characters' wealth?
Do they have the corpses?
Do they already know where the corpses are? Do they have access to them? Are they already in someones possession?
If the party doesn't currently have the corpses but does know where they are... then it's easy: by time the new characters get to them, someone else has already looted the bodies.
If you think the party can actually get the items on the corpses, lower their starting wealth appropriately. Character wealth guidelines are guidelines, they can and should be altered as needed.
If you can't do that (because the players will be angry about it), then you'll have to alter the upcoming encounters to lower the amount of loot they get until they're back in line with where they should be.
If you just use the wealth rules as-is but also let them get all their previous character's stuff back, you're encouraging them to change characters every time they die. Doing so gives them a major wealth boost.
There's lots of reasons you want to discourage that:
I was in a game once where resurrection was strongly encouraged, because a new character would come in with HALF the wealth of the old character. Granted in the event of a total party wipe he likely wouldn't enforce that, but we wouldn't be able to get the gear back in that case either without so much work that it'd just be an adventure of its own.
If you wanted to retire a character, you would leave the party while alive (with all your gear, so the party gets no wealth boost), and your new one would come in with full equivalent value. As a result, that only happened when someone was unhappy with their character and not because the character wealth chart said they could get ahead by doing it.
Not Pathfinder, but the 3.5 DMG suggests reducing the amount of gear the new PC receives by the cost of the gear that the old PC has left behind. If the gear is in such a place that it's not immediately retrievable by the new PCs, I would recommend just not counting it at all.
If the PCs wanted to ultimately retrieve that gear later (even if it's right away), I would design the whole thing as an adventure and include the gear as part of that adventure's treasure parcel. If they left behind more gear than you would normally include in an adventure appropriate for their level, then have some of the more powerful items spirited away by some foul creature or nefarous thieves to bring back as villains at a later date.
The approach that I typically use is to count the value of the dead character's gear as a sort of 'wealth debt' that is repaid by reducing future wealth gains. I cut all wealth gains in half until the party has fully paid off the value of the dead character's gear. If the players start being suicidal a lot, then raise the penalties further.
In any case, you should definitely not penalize the new character unless the gear is extremely similar. If my archer dies and I roll a new archer, then I can probably use most of the existing gear as-is without much trouble. If I change roles, however, then a new character that has wealth penalties will end up at a significant disadvantage because they can't effectively use the dead character's gear.
Another solution that might work is the idea of an honorable burial. Basically, have the culture that the players are from encourage people to bury fallen allies with the gear they fell in. Perhaps award roleplaying xp, or other non-gear rewards for following this practice.
In situations like these, I would honestly let the characters deal with that how they will. If one of your buddies falls in battle, and he's got some shiny stuff, something is going to happen to that shiny stuff (whether it finds its way into an ally's hands, pawned by the party rogue, studied by a wizard, vanquished by a paladin, or thrown into the nearest lake by a magic-hating dwarf.)
If the party has moved on to a point where magical items, gold, experience are now in a more advanced stage, then those players should simply create their new characters at the stage that the rest of the party is in (e.g. start them at the same level as the lowest leveled party member, gift them a reasonable magical item of choice to begin with, give them multiplied starting gold, etc.)
I personally think encouraging going and pilfering your previous body based on player knowledge isn't exactly promoting much roleplaying.