Thanks for your question.
There are five relationships God ordained for individual Christian, viz.: the Home (Ephesians 6:1-4), the Government (Romans 13:1-8), the Community (1 Peter 2:12), the Business (1 Thessalonians 4:11-12), and the Church (Ephesians 3:9-11, 21). Although, the home is the first and oldest institution on earth (Genesis 2:24); the Lord's church is considered the greatest institution considering the cost (the blood of Jesus) for her inauguration (Acts 20:28).
However, every husband and father is demanded to be faithful and responsible at home especially in godly leadership and upbringing of their their children. They are expected to be like Abraham who properly brought up his children and his household (Genesis 18:19). Besides, Ephesians 6:4 says, "And, ye fathers, provoke not your children to wrath: but bring them up in the nurture and admonition of the Lord" (KJV). Any man who fails as a husband and father at home is said to have denied the faith and worst than an infidel (1 Timothy 5:8).
Meanwhile, for someone to a pastor /shepherd (who is also known as overseer /bishop and elders /presbyter, cf. Acts 20:17, 28; Titus 1:5, ,7; 1 Peter 5:1-4) in the church, he must have been "one that ruleth well his own house, having his children in subjection with all gravity. For if a man know not how to rule his own house, how shall he take care of the church of God? (1 Timothy 3:4-5, KJV). Anyone whose wife is rebellious and his children wayward does not qualify to be a pastor in the church in the first place. One who cannot rule his house has failed to be a worthy pastor in the church.
Hence, husband's and father's duty comes first to be qualified, appointed and to work as pastor in the church.