I let them know about 6-months in advance by writing a well-crafted letter (not an email), that my hourly cost will be increasing. Justify the increase (which you can easily do) by indicating the cost of maintaining the certifications you currently hold, your cost for liability insurance, the last time you made an increase, etc. My clients have been very understanding as long as you can indicate in a transparent manner “why.”
If you’re talking a minor (ex: $5) increase, just do it immediately. If that amount is enough to chase a client away, did they really value your service in the first place?
Now if you’re looking at a major increase, don’t just change the price – change the entire program/offer to one that (obviously) provides more value.
I directly tell them that my hourly rates will be increasing by so much and give them a date at least 3 months in advance. Then I ask them if that would affect their ability to train with me and negotiate how much extra they could afford if that is the case. They really appreciate that I am willing to work with them especially if I know they are on a tight budget in the first place and really value my service enough to pay more.