I generally advise against
developing on your PC (*AMPP local server) unless you fall into one of the two following groups:
- You don't already have a host account and domain (such as with Lunarpages), and want to play around a bit with a site before you commit to spending money and buying hosting.
- You need to work with PHP or MySQL levels that your host does not yet support. *AMPP installations are often "bleeding edge" levels compared to what's on a shared server.
In any case, never
try to host a real live site (accessible by the Web) on your PC, especially if it's ecommerce or otherwise involving money or sensitive information. Rest assured that hackers out there know far
more about security issues than you ever will, and will attack you and eat your lunch the minute you go live. Hosts (such as Lunarpages) put a great deal of time and effort into protecting their customers against attack -- it's not foolproof, but wouldn't you rather be doing something else than babysitting your server 24-7? Besides, you're committing to keeping your PC running 24-7; you can't turn it off or do any work on it that would disrupt the server.
The big problem with developing on a local server (*AMPP) and then transferring it to a commercial server is that the version of everything will be different. Your local server might have PHP 7.2 or even 7.3, and if you develop to that standard and then transfer it to a PHP 5.6 commercial server, you could have lots of fixing to do. Same thing for MySQL and Apache levels. It's not to say that it's impossible
to develop and test on a local server, but you have to constantly keep in mind what your target system's software levels are, and write to them. It rarely turns out that you FTP your files over and bang!, you're running. Sometimes you find you've accidentally used an advanced language feature that won't be available for years
on your commercial server. That can be quite a bit of rework, and you don't want your site down. At the least, you should test your revised site in its own, private test directory (which can be password-protected). Don't assume that your code which runs fine on your local server will
immediately run fine on your real server!
Some will argue that you save file transfer time and effort by editing/developing and then testing on the same machine. You can edit a file and then immediately run it, rather than having to upload it first. To each his own. Keeping an FTP client window open saves startup time. Having the (slightly) older version on the commercial server can act as a backup if you make a serious error handling or editing files on your PC. Having to take one extra step (upload) can be a disciplinary aid to make you stop and think for a moment whether your revised code is really ready. It almost comes down to "six of one, a half-dozen of the other".
If you're a computer pro and live and breathe complex software, you might enjoy installing and maintaining a local server. If you're not a pro, you'll have a lot to learn before you can do anything useful -- is that how you want
to spend your time? It's up to you!