To open a bar in Philadelphia, you need a Philadelphia County liquor license. State law limits the number of licenses each county can issue to one for every 3,000 residents. If Philadelphia is maxed out when you get ready to open your bar, you have to find an establishment that's willing to sell you its license. Then you file with the state to have the license transferred. The state doesn't set the price; that's up to you and the seller.
In addition to a liquor license, you need a city food license. Even if you're not actually feeding your patrons, serving drinks requires the same license. You have to get your liquor license first, then apply for the food license. The cost of the license is $300 at time of writing.
Finding a Home
If you're starting a new bar rather than buying an existing institution, you'll have to search for a suitable location. Contact the city government or research online to determine if the zoning at the spot you want accepts bars. If the property had a different legal use before you took it over, you'll have to apply for a use change. Before you begin any construction or remodeling, apply to the city Health Department to see if your new bar meets Philly health regulations.