Filing for bankruptcy can be the best option if you find yourself in serious financial trouble. It gives you a clean slate to begin again without debt hanging over your head. However, bankruptcy also does some damage to your credit because it is a sign that you mismanaged your finances in the past.
Realtor.com explains that a bankruptcy can make it very difficult to buy a home because lenders may be hesitant to loan you money.
You will almost never find a lender immediately after your bankruptcy discharge. You should expect to have to wait at least one year before any lender will even consider your mortgage application. Some loan programs or lenders will want you to wait longer. An FHA loan is your best bet for the earliest financing option.
After your bankruptcy, your credit score will usually be too low for most lenders. You will need to work to get it back to a good level, which can take time. Remember the bankruptcy will remain on your credit report and impact your score for years, so you need to move forward by making good credit decisions that will raise your score despite that negative mark.
Because you filed for bankruptcy, you have to make your mortgage application as attractive as possible. You need a solid employment history and should have a decent down payment. You want to do everything you can to counter the negative mark of a bankruptcy and woo the bank to lend you money.
It can be more difficult to buy a home after bankruptcy, but it is not impossible. People do it every day.