We've got a closet with a pair of overlapping sliding doors that hang, by their wheels, on a top-mounted rack. There's a bottom guide screwed to the floor that keeps the doors lined up. But unless a door is opened carefully and slowly, one or both of its wheels come off the track. Are there any tricks or adjustments I can make to prevent this?
Tip #1 I do a lot of remodels and the easiest way to make a bedroom look newer is take out the old hollow doors or mirrored doors and put in 6 panels. Not many closets are square either. The first thing you need to do is use the rolling mechanism to adjust the door meet the wall as good as you can. You can angle the rollers and move them up and down. Obviously your door needs to slide on the floor so you have to play with this a little. But try to get each door to match its outside wall.
Tip #2 Buy better rollers. These only cost a couple dollars at big box and if you are taking old ones out, there is no extra work. For instance the roller in Mazura's answer isn't as adjustable as the normal roller you would get at big box.
Tip #3 You want a little friction on the flooring... But that only works with carpet. If closet doors are flung open the pressure of the roller will eventually affect the track each time it jumps off. So get the doors a little lower.
Tip #4 Make sure the rollers are about 3-4 inches from the outside of each door. The closer to the middle your rollers are, the easier for them to jump.
Tip #5 Get a good light/flashlight and inspect your tracks. Most tracks are about the same quality (I am sure there are high end ones but I haven't seen them). You can have two problems with the track. First the track can be angled down. This just happens with the weight of the door over time. It actually doesn't hurt to have it angled up slightly (open side of track). For this use a wood block and hammer.
The other thing that goes wrong is the lip itself becomes deformed or it get pushed down. I would simply tap this into place with a hammer. For more deformed sections I break out the pliers. If I am having an issue I go through the whole track with pliers.
Tip #6 Grease the wheels and track.
Buy new rollers if adjustments do not avail you. To remove the door, disengage the lower track. Standing outside, tilt the bottom of door towards you. Lift slightly and the door should fall off. Insure the track is free of debris. Measure your roller arm carefully, Prime Line Products has many types and sizes. Your wheels probably don't look like this anymore, on Ebay:
Check the area where the doors run along the bottom ,on many older homes the bottom of the door runs on a small piece of iron known as a sled. If any debris plaster etc. is in the doors glide path it will lift the door when closing and will knock the roller off the track. Just use a flashlight in one hand and a long thin stick (yard stick) in the other hand and push any debris over to the side (left and right) and clear the doors path and you should be ok. Also to get the roller back on track lift the door at the bottom with a large flat head screwdriver and a block of wood and wiggle the door left, right, in and out until the roller seats on the rail. This may take many attempts unless you get lucky. Good luck , it's a real pain , but better the tearing your walls out .
Most high end sliding door hardware has captive wheels. that means the track has a top edge as well as a bottom edge.
While changing tracks is a project, it should solve the problem.