Best practice for local development

Your question is quite broad, so hard to give an exact answer without me spending ages on a reply - but using anything like XAMPP is a bad idea from the start (I know from experience) especially with Magento.

My preferred way is to use a virtual machine running Linux - in my case Ubuntu 16.04LTS server edition (as it's the same as my production server)

Virtualbox is free -

On this virtualbox, I install nginx, php7.0-fpm etc. (as per the Magento 2 devdocs) and configure in the same manner as my production/staging servers. I'd then make a host entry in Windows that points my 'dev domain' to the virtualbox IP.

I then use n98-magerun to export a 'developer' version of my production database, a must to avoid customer data being present on your local machine (GDPR, best practices)

Mount a folder from your virtualbox into windows, you can then open this folder in an editor such as atom to work on your project.

If you work this way, then you'll have no issues when you move to Mac also, as you can work on Mac, Linux or Windows. Your virtual machine image can always be the same, and as your production and staging servers with no nasty surprises when deploying. I recommend git for deployment and general version control also.

Larger companies also use things like docker, this lets you spin up a magento instance in its own container from an image - more portable than virtualbox, but virtualbox will fit your need just fine in my opinion.


  • Use same OS as your production/staging servers.
  • Use same PHP versions as production/staging.
  • Ensure to cleanse data from production db
  • Avoid one click install solutions, you'll learn way more about Magento by doing your own deployments.

If you have any questions, let me know and I will try to elaborate in my answer :)