When working on localhost the URLs have begun with
http://localhost/~macuser/example.com/ and the file paths have begun with a local file path.
What is the best way to deploy a site once it is finished?
IMHO, I suggest you start with a config file that will work irrespective of where your current environment is - there's a good gist here: https://gist.github.com/1329538
There's also a version of it here, but I haven't tested this one: http://ee-garage.com/nsm-config-bootstrap
After that, you'll want to get a good deploy workflow going. I suggest using GiT for your version control and Capistrano for the deploy phase. There is a really good guide on hive logic that should get you started: http://hivelogic.com/articles/deploying-expressionengine-github-capistrano
Finally, if you're migrating a db over, I suggest you look into REElocate plugin: http://devot-ee.com/add-ons/reelocate which is good for changing path variable in the database. This is a good way of uploading your database to the live server and then changing the values.
This is probably the best deploy setup I've come across so far for ExpressionEngine - most of the things that can usually get screwed up if you do them by hand are automated, and you can even roll back if something gets messed up during deploy.
It's a lot to learn if you've not used these technologies before, but well worth it! I heartily recommend learning as much as you can about both GiT and Capistrano! Good luck!
If you're not currently using version control or config overrides to manage your paths... then I highly recommend, Deploy Helper by Hop Studios. It places almost all the configuration parameters you want or need to change on a single screen. Which makes transition from one server to the next, much easier. This works, when you just need to move the site to a new location, regardless if its an official deploy or you just changed development servers.
REElocate by Esp:resso is also a deployment helper. It works similar to Deploy Helper and was done by the same company that produces Store.
There is also Master Config by Focus Labs. Master config works a bit differently. It gives you a process to set-up and deploy to multiple environments. It's worth having in your toolkit, and can be used for a completed project, but probably works best when you are starting a project. At least that's my opinion, others may disagree.
There are a growing number of articles around using
If that is of interest to you (and it should be), then here are some recommended starting points:
(!)This one is my favorite reference point, just because its very close to how I want my set-up to be— local MAMP, Git, BeanStalk and Mountee.
I've been keeping a list of resources on the topic that I've found beneficial, you can access it here on Kippt. Hope this is helpful.