pporto - check the name plates on your existing motors and google the spec sheets - these will give you an indication of the current torque / mounting dim's etc.
Note that the G540 maximum current for stepper is 3.5A, so you'll have to keep your new motors under this. Check out geckos resources here:
https://www.geckodrive.com/support/g540-rev-8
Re: VFD - I'm not familiar with your drive, but the principle is pretty much the same for most of them. Fist of all you'll need to find the user manual as this will let you figure out the exact settings (and how to change them). In terms of wiring, check out my manual on wiring a different sort of drive here:
https://github.com/Viking-Machinery/Vik ... %20Ltd.pdf
This is a different drive to yours, but the principle of wiring is essentially the same between drives. It's a Mach focused manual, but the actual wiring is likely to be pretty spot on for what you're doing. The G540 link has details on their spindle control options too.
Safety disclaimer time! Mucking around with wiring (especially with the VFD and "mains" voltages inside the cabinet) may be prescribed electrical work where you are. Make sure you are allowed to do this under your local jurisdiction, and if in doubt just get an electrician in to help you. It'll cost a bit, but not as much as trashing a machine tool or burning your workshop down!
Cheers - James