Study this example situation:
Sue wants to call Paul, but she can’t do his because she doesn’t know his phone number.
If I know his number, I would call him.
She says: If I know his number …. This tells us that she doesn’t know his number.
She is imagining the situation.
When you imagine a situation like this, you use if + past (if I know / if you were / if we didn’t. etc.).
But the meaning is present, not past:
Tom would read more if he had more time. (but he doesn’t have much time.)
If I didn’t want to goto the party, I wouldn’t go. (but I want to go)
We wouldn’t have any money if we didn’t work. (but we work)
If you were in my position, what would you do?
It’s a shame you can’t drive. It would be helpful if you could.
We use the past in the same way after wish (I wish I know / I wish you were, etc.).
We use wish to say that we regret something, that something is not as we would like it to be:
I wish I know Paul’s phone number.(= I don’t know it and I regret this)
Do you ever wish you could fly? (you can’t fly)
I rains a lot here. I wish there weren’t so many people.
I wish I didn’t have to work tomorrow, but unfortunately, I do.
If I was / If I were
After if and wish, we use was or were with I/he/she/it. Was it more informal.
So you can say:
If I was you, I wouldn’t buy that coat. or If I were you, …
I’d go out if it wasn’t so cold. or … if it weren’t so cold.
I wish Carol was here. or I wish Carol were here.
We do not normally use would in the if part of the sentence or after wish:
If I were rich, I would have a yacht. (not If I would be rich)
I wish I had something to read. (not I wish I would have)
Sometimes wish … would is possible: I wish you would listen.
Could sometimes means “would be able to” and sometimes “was / were able to”:
You could get a better job (you could get = you would be able to get)
if you could use a computer (you could use = you were able to use)