I'm trying to set up a nice development environment for magento. Naturally, I also try to take deployment into consideration. This is why I chose to implement docker containers. My project is very small, nonetheless, I find it a good investment learning how to deal with containers.

PHPStorm - or any IDE really - needs fast access to files in order to function properly. As far as I know, this means that the magento installation at least during development needs to be stored locally.

The problem that I have right now is that the web shop I'm building receives API requests from an ERP. Naturally, the DNS points to the production server. This leads me to my first question:

How do I deal with API integrations when developing locally?

First thing that crossed my mind was perhaps setting up an API proxy of some kind. But it might also be that case that I should be approaching magento development differently. Judging by the fact that magento has a built-in development mode, perhaps I'm not supposed to have two copies of the installation, one locally and another one in the production server.

Thinking a little bit ahead, another problem that will arise if I continue developing locally is e.g. that my database will probably differ from that of the production server, although I must stay I'm not sure how much of the website settings etc magento persists through the database. More specifically, at some point I will attempt to develop PWAs for existing web shops using magento PWA studio. Leading to my second question:

Developing locally for a magento installation already in production, how do I guarantee successful deployment when I'm done developing?

1 Answer 1


I have limited experience with containers. But I have developed Magento APIs in a local environment. I am personally a fan of PHPStorm. It has a few plugins for symfony and Magento that are quite helpful.

My development environment has everything except the database installed locally. I have the cheapest AWS Lightsail database development (because it was quick to setup). This way if I have to work from home, I can download all of my code from github, while still having the same config from the database.

As for the API, I'd suggest ngrok and postman. Both are free and easy to use. Ngrok is only necessary if you are making API requests to a local environment over the internet. Postman allows you to simulate API calls, even locally.

It's hard to guarantee that everything will be 100% functional in a production environment, but this is a good way to get started. You can also create a staging environment that has the same configuration as your production environment. I usually do this after I've thoroughly tested my code on a local environment to keep costs down.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.