Most of this has been said already, but I'll piece together my take on it as well, in one condensed post. Much will depend on how much money you want to spend, how soon you plan to upgrade, and how much maintenance you want to do. Only you can decide those, but I'll give my recommendations based on the mistakes I and others have made for themselves or for getting a spouse or friend into riding dirt.
Since you already said you are willing to upgrade again later, I'd go for a small, simple off-road only, air-cooled bike. They are cheap, reliable, nearly maintenance free, small and easy to throw around. You won't get as much suspension travel or as much grunt, but this is your first off-road bike and tractable, soft power will be your friend as well as light weight and lower seat height. More like riding a minibike that you can throw around rather than a tall, high strung, high maintenance race bike that you can only touch the ground with your toes. You might outgrow them in a year, but so what. Used ones are everywhere so your entrance fee will be cheap (less that $2,000) and resale will fetch you almost what you pay for it. Off-road only means no turn signals to break, etc. Two perfect examples would be the Honda CRF230F or the Yamaha TTR230. They are nearly the identical bike. Pick which one you'll get by your color preference or what becomes available used because both feel, ride, and dimensionally are nearly identical. You may want to avoid ones with aftermarket pipes and other sign the user beat on it or tried to ride it like a racebike, however it really doesn't matter. Short of serious crashes, these bikes are bullet proof and there is little one can do to harm them (even neglected oil chainges). Both have come with electric start for some time so you'll have the magic x button. So those two are my top recommendations.
My wife has ridden street bikes off and on for 20+ years. Year before last, she changed over from street to dirt, so we bought a used CRF230F. She road it one season and then bought a WR250R like mine. That may seem a waste, but if I had gone straight to the WR250R dual sport, I think she would have had a horrible time and when she has a bad time, she stops doing it. I wanted her to succeed and have fun. Only a small, easy to ride bike could have done that...and it did. I sold the CRF230F to a friend (for the same that I paid for it a season before) that owns a Triumph Tiger, but wanted to learn to ride dirt. He's big for the bike, but has really enjoyed it and learned a LOT about offroad riding over the last season. It's a lot easier, and confidence boosting, to start with a smaller, simpler bike and then upgrade rather than buying a more expensive and taller heavier bike hoping to "grow into it". Way too many people make that mistake and because of that, it takes way longer for them to become proficient and confident offroad. Buying too big and too powerful of a bike will set you back many hours, in my opinion. I've seem it many times.
If you do go with a race bike, which I recommend against for your first bike for the reason mentioned above, at least go with an enduro bike rather than a motocross bike. motocross bikes have close ratio transmissions, no headlight, tail lights, often have four titaniim valves rather than two ti and two stainless (more adjustments needed for ti), no electric start, and several other reasons. Note that all of these racebikes will have you doing more maintenance. Oil change after each days ride, much more often valve checks, etc. The play bikes and dual sports will more than likely be once or twice a season oil changes (depending on mileage) rather than after every ride. That alone got me tired of my racebikes over the years. That's why my small bike (and my wife's offroad bike) are WR250R. 3,000 mile oil changes (I do 1,000 - 2,000 when riding dusty areas), 24,400 miles for the FIRST valve check, 6 speed, Fuel injected, 350watt alternator runs my GPS and heated gear plus more, and there are now plenty of aftermarket items and used bikes available (we bought my wife's 2008 in 2010 for $3,200). Only downside for a beginner is weight (almost 300 lbs) and turnsignals/radiator to damage with crashes. So, I stick with my first recommendation for the CRF230F or TTR230. Then, when you upgrade, you can decide if racebike or dual sport is right for you (and what will make the best bookend for your inbound ST).
It's worth noting that one little letter makes a big difference between models. Even in this thread, I've seen an example or two where the r and f mixed up between hondas and yamahas, race bike and play bike and dual sport, etc.
To clarify some of the model names of current production bikes from Yamaha and Honda that would fit into your search criteria (some better than others):
Motocross bikes (liquid cooled race bike for tracks):
YZ450F
YZ250F
YZ250 (two stroke)
CRF450R
CRF250R
Enduro (liquid cooled race bike for trails):
WR450F
WR250F
CRF450X
CRF250X
Offroad trail bikes (air cooled, low maintenance, play bikes):
TT-R230
CRF230F
Dual purpose (street legal. Some air some liquid cooled):
WR250R (WR250X is supermoto)
XT250 (and previous model XT225)
TW200
CRF230L
There are many other bikes from KTM, Suzuki, Kawasaki, etc that will fit in these categories as well, though probably slightly less common on the used market. Of the bikes listed above, the last two categories are recommended for a first offroad capable bike. Regarding dual purpose bikes, you might think you don't want or need a streetable bike, but it comes in very handy and you might find yourself riding it quite a bit on the street to various trails, etc. once you tire of riding the same acreage over and over, but that can always be the next bike as the offroad only bikes (even the play bikes) would be better leaner bikes (lighter and less to break).