Get in the habit of having the plot fully outlined before you start with any of the actual writing.
This is the standard advice I give everyone now. This saves you sooo much trouble in the long run, you can identify plot holes or other problems from the start and easily fix them, and then you just start throwing words down, scene by scene, without having to stop constantly and second guess yourself.
You don't ever have to worry about writing yourself into a corner or running into a brick wall because you already know exactly where the story is headed. And all your revisions afterwards will just be for clearer wording or sentence structure or whatever, you won't ever have to pull a story completely apart or rework it in a major way if it's built on a solid framework.
Tip #2 is to take an editing/revision process as a given thing, meaning once again that you can just
write without stressing about every sentence being perfect. Easier and quicker to go back and polish up a passage later than to try and create a flawless one out of nothing and winding up staring at a blank page.
Even if you have to put the project down a long time, you can pick it right up again right where you left off.
Oh, and there's this to keep in mind when laying out your plot: