I’m planning on traveling from Dubrovnik to Ljubljana along the coast. Flying into one city and out the other city. I want to use public transportation (bus/ferry). Do I need to purchase tickets in advance?
I haven't ferried in that area for 35 years. For the buses, I imagine you generally don't need to buy in advance (certainly not more than a few days in advance), but international buses are a special case. They are usually rather infrequent, and in my experience they typically head out full or nearly so. Even if they don't look full, there may be a slew of people waiting with pre-purchased tickets at the very next stop.
I do not lay out a day-by-day itinerary ahead of time. My practice is to check the outbound bus schedule as soon as practical after arrival. If I'm firm on my departure plans and taking a long-haul bus, I might go ahead and buy the ticket right then--but I do like to maintain as much flexibility as possible.
Keep in mind that lines at bus-ticket windows are unpredictable; you can't show up 15 minutes before departure and be certain of making the bus. The person in front of uou may be organizing a family's tickets to Istanbul. It's much more relaxing to have the ticket already in hand.
You should definitely explore your options for getting to Ljubljana now. It will probably take more time than you'd expect from just looking at a map. There are both buses and trains connecting Zagreb (which I like a lot, but which is not in the coast) and Ljubljana. I traveled by bus between Ljubljana and Rovinj, in Croatian Istria. I've had no personal experience with other routes. If you know what your last stop will be in Croatia, Rome2Rio.com will probably suggest some possible transportation links. Do not trust its information on duration, frequency or fares, but it usually provides links to the websites of the appropriate bus company/companies.
Do mot be surprised if you are asked to pony up an extra fee (in the $1 range as of 2015) to stow a bag in the hold of the bus. That is pretty standard procedure in that part of Europe.
We started in Dubrovnik last fall, bus to Split, and then bus to Zagreb for the train to Ljubljana as this was by far the most efficient routing with the least travel time we could find. Do not write off Zagreb becasue it is not on the coast, the o,d city is lovely. Also keep in mind when flying out of Ljubljana thatthe airport is most of an hour bus ride to the north and you may experience difficulties in getting an early bus (seems all the connecting flights you would have from there are out by 8AM). We stayed our last two nights in the little village of Vopovlje a couple miles form the airport, there are 3 small penziones there that will also drive you to your flight. It is reachable by the same bus from Ljubljana that goes to the airport. They can also arrange for transportation to Lake Bled while you are there.
As for bus tickets in advance, I am not sure if you NEED to, but it is very easy to do so online, and if you know you can commit to times, why not? For any ferry i would think advance would be wise.
Thinking of this itinerary
Flying into Dubrovnik, 3 nights including day trip to Mostar, arrive late from U.S.
Bus or Ferry to Split, 2 nights. Thinking bus since it appears to be quicker
Fly from Split to Zagreb, one night or Fly from Split to Ljubljana and save a day
Take the train from Zagreb to Ljubljana, 2 nights, rent a car - Alps, Lake Bled
Last night, close to airport, early morning flight
Fly out of Ljubljana
I don't think you'll find any non-stop flights from Split to Ljubljana.
Depending on your specific connections, some transport options can vary dramatically depending on what time of the year you're going. Some ferries and bus routes only operate seasonally - in the "low season" (not always defined consistently) some routes may not run at all (for months), others may just be on a reduced schedule (not every day) or smaller capacity. On the other hand, at peak summer season, some routes may sell out (eg some smaller ferries and buses).
It's best to check specific routes carefully in advance and figure out (for your travel dates) what does/doesn't work at all and which (if any) you might need to nail down early and which you can just play by ear.
Going end of August/1st week of September which I believe is still peak time. I am willing to risk missing some buses. I want to have flexibility as one of the other posters recommended. I will book the bus once I arrive in the city for travel the next day or 2 days later.