For the benefit of others coming across this post, I had the same problem and found this.
The post didnt help but my strategy for solving involved checking the pins on the motor, despite the rest of the internet having correct schematice my PCB must be wired different, in particular the red is on the opposite side of the motor plug, the whole thing when correct is backwards, and the colours are not wired to int1 through int4 in the same way. So its process of elimination in the program to find the right solution.
Heres what did in code to allow me to test every solution....
// initialize the stepper library on pins 8 through 11:
//Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); // originally blue green yellow orange, now irrelevant
//Stepper myStepper(stepsPerRevolution, 8, 9, 11, 10);
//Stepper myStepper(stepsPerRevolution, 8, 10, 9, 11);
//Stepper myStepper(stepsPerRevolution, 8, 10, 11, 9);
//Stepper myStepper(stepsPerRevolution, 8, 11, 10, 9); close right
//Stepper myStepper(stepsPerRevolution, 8, 11, 9, 10); cr
//Stepper myStepper(stepsPerRevolution, 11, 8, 9, 10); cr
//Stepper myStepper(stepsPerRevolution, 11, 8, 10, 9); cr
//Stepper myStepper(stepsPerRevolution, 11, 9, 8, 10);
//Stepper myStepper(stepsPerRevolution, 11, 9, 10, 8);
//Stepper myStepper(stepsPerRevolution, 11, 10, 9, 8);
//Stepper myStepper(stepsPerRevolution, 11, 10, 8, 9);
//Stepper myStepper(stepsPerRevolution, 9, 10, 11, 8);
//Stepper myStepper(stepsPerRevolution, 9, 10, 8, 11); cr
//Stepper myStepper(stepsPerRevolution, 9, 8, 10, 11);
//Stepper myStepper(stepsPerRevolution, 9, 8, 11, 10);
//Stepper myStepper(stepsPerRevolution, 9, 11, 8, 10); cl
Stepper myStepper(stepsPerRevolution, 9, 11, 10, 8); //strong
//Stepper myStepper(stepsPerRevolution, 10, 11, 8, 9);
//Stepper myStepper(stepsPerRevolution, 10, 11, 9, 8);
//Stepper myStepper(stepsPerRevolution, 10, 8, 11, 9); //strong
//Stepper myStepper(stepsPerRevolution, 10, 8, 9, 11); // backwards
//Stepper myStepper(stepsPerRevolution, 10, 9, 11, 8);
//Stepper myStepper(stepsPerRevolution, 10, 9, 8, 11);
I hope it helps others copy and paste a quick testing technique.