Take a look at an example situation:

Sue wants to phone Paul but she can’t do this because she doesn’t know his number. She says: If I knew his number, I would phone him.

SUE: If I knew his number… .

This tells us that she doesn’t know his number.
She is imagining the situation.
The real situation is that she doesn’t know his number.
When you imagine a situation like this, you use if + past
(if I knew / 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 go to 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 pity you can’t drive. It would be useful if you could.
We use the past in the same way after wish.
(I wish I knew / 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 knew Paul’s phone number.
(= I don’t know it and I regret this)
• Do you ever wish you could fly? (you can’t fly)
• It rains a lot here. I wish it didn’t rain so often.
• It’s very crowded here. I wish there weren’t so many people.
(but there are a lot of people)
• I wish I didn’t have to work. (but I have to work)

After if and wish, you can use were instead of was.
(if I were / I wish it were etc.). So you can say:
• If I were you, I wouldn’t buy that coat.   OR   If I was you…
• I’d go out if it weren’t raining. OR   …if it wasn’t raining.
• I wish it were possible. OR   I wish it was possible

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).
See “Conditionals” lesson “WOULD / I WISH… WOULD”.

Note that could sometimes means would be able to and sometimes was/were able to.
• You could get a job more easily (you could get = you would be able to get) if you could speak a foreign language. (you could speak = you were able to speak)