Writing ads to attract female PhD candidates
It is believed that the use of "gendered" language in job ads can make ads appeal more to men or women [1]. See no reason that this should not also apply to ads for PhD students.

There are several websites that claim to test your job Ads for gender bias based on the word lists in [1]. 

E.g.

http://gender-decoder.katmatfield.com/

or

https://www.totaljobs.com/insidejob/gender-bias-decoder/

The other common advice is to avoid specifying requirements that are not really requirements, but actually nice-to-haves. Widely cited research [2] suggests that men are far more likely than women to apply for a job even if they don't meet all of the requirements. So for example, if you say that you require students to have taken a class in X, but when it actually comes to it you get no good applicants that have, but decide to take a student who is really good in all other ways, but does not have class X, then class X shouldn't be specified as a requirement, but a nice-to-have. Saying in your ad that applicants must have X is then biasing against women. 

Mind you, I always follow all this advice (the gender checkers even rate my ads as slightly feminine bias), but I still get next to no female applicants.

[1] Gaucher, Friesen, and Kay, Journal of Personality and Social Psychology, July 2011, Vol 101(1)

[2] https://hbr.org/2014/08/why-women-dont-apply-for-jobs-unless-theyre-100-qualified