Creating a brush-based door.
First, there is the need for a space in the wall where you intend to place the door. this is made by splitting the wall into two, then placing a brush in the gap over the doorspace. DONT FILL THE DOORSPACE! Make sure that there is floor underneath the doorspace, otherwise you will have a leak.
Creating a brush for the door
Second, you will need to fill the doorspace with a brush. The brush should be a different texture from the wall.
Turning the brush into the door
To turn the brush into a door, right click on it while it is selected in one of the 2D views. Then select 'tie to entity' and from the entity list select either func door rotating or func door. If you want your door to move up or down, select func_door and scroll down the options until you reach '