How do I fix FiveM resource start order?
Fix FiveM resource start order by listing dependencies before dependents in server.cfg, since FXServer processes it largely top to bottom: your database connector (such as oxmysql) first, then your framework core, then shared libraries it requires, then framework-dependent scripts, then gameplay and job resources, then maps last. If a resource's manifest declares a dependency, make sure that named resource is both present and ensured earlier in the file, not just installed somewhere on the server.
In one lineFixing FiveM resource start order means arranging `ensure`/`start` lines in server.cfg so every resource loads after the resources it depends on, since FXServer starts resources in the order they're listed.
The longer answer.
FXServer works through server.cfg from top to bottom, so the practical fix for most start-order problems is moving lines, not changing code: a resource that reads from a database on start must be listed after the database connector; a resource that calls a framework export on start must be listed after that framework core. The manifest's dependency field documents the relationship and produces a console warning when it's violated, but the field is informational — the line order in server.cfg is what actually determines what has started by the time your resource runs.
A conventional, working order looks like: database driver, then framework core, then shared utility libraries (like ox_lib) that many other resources call into, then resources that need the framework (jobs, garages, banking, MDTs), then general gameplay content, then maps and MLOs, then anything purely cosmetic or standalone. Resources with no framework dependency at all are the most order-tolerant and can safely sit anywhere.
`ensure` is the modern directive and the one to use — it starts a resource if it isn't running and cleanly restarts it if it is, which also makes it safe to re-run after you reorder server.cfg. The older `start` still works but doesn't restart an already-running resource, which can mask an order fix during testing because the resource keeps running with its old, wrong load order until the next full server restart.
The checklist.
- 01Identify every dependency the failing resource's fxmanifest.lua declares, and any export it calls immediately on start.
- 02In server.cfg, move the database connector (oxmysql or equivalent) to the top of your resource block, before anything that queries it.
- 03List your framework core immediately after the database driver, and shared libraries such as ox_lib right after that.
- 04Place framework-dependent gameplay resources — jobs, garages, banking, MDTs — after the framework core and its shared libraries.
- 05Put maps, MLOs, and purely cosmetic resources last, since they rarely have startup dependencies.
- 06Restart the server fully, not just refresh or ensure the one resource, so everything reloads in the new order, then check the console for remaining errors.
Where this is covered in full.
People asking this also ask.
Where to go from here.
Published 2026-09-02 · Last reviewed 2026-09-02 · Vice Drip · All answers