If you can, remove the door and door frame molding. Look to see if there is enough space without the door frame molding, called the "jamb." If there is not enough room, do not "jamb" the washer through, or you will damage the wall. This may provide enough room, however, to get the washer through, since the washer is usually about 25-27 inches wide.
If not, you need to know two more things, the direction of the floor or roof structure above, and whether the post supports for the door are holding anything up. If you can determine that the posts, the vertical supports that your door frame was attached to, are not holding anything up, then they can be removed by cutting out at the top and bottom with a reciprocating saw and metal cutting blade. If you are not handy or have never done this, you should hire someone who can do this, or you may need a better detergent and washer just to get the blood stains out of your clothing.
This will open the doorway up enough to move the washer. Now that the posts are out, it would be smart to select a bigger door or a different type of door, such as a bi-fold or sliding type, and have the opening changed so that you can slide the washer and dryer in and out easily. Check door sizes and appliance sizes and plan the whole thing out before cutting anything.
It is always best to measure twice, cut once. Good luck!