You don't need to deploy stuff when you are on developer mode.
This is an essential step in using Magento: never ever leave the mode after the installation.
From the official guide, here:
To improve security and ease-of-use, we added a command that switches Magento modes from developer to production and vice versa.
Production mode also has better performance because static view files are populated in the pub/static directory and because of code compilation.
Long story short, there are 3 modes.
default. This is the default (ha!) mode for Magento2. Its not optimized for production mode, nor useful if you want to change something on the system.
Secondly there is
developer. Most likely, this is what you want. If you are trying to change stuff on your store, code-wise, you want to enable this. What does it do?
- Symlinks to static view files are published to the pub/static directory
- Provides verbose logging
- Enables automatic code compilation
- Enables enhanced debugging Shows custom X-Magento-* HTTP request and response headers
- Results in the slowest performance (because of the preceding)
tl;dr: you only need to recompile
pub/static/* if you change _less files. If you change
__construct-Methods in your module, you generally only need to clear
var/generation/*. Anything else will be automatically deployed (with Symlinks). NOTE: This might be harmful to a production system.
Last and least: the production mode. If you enable this mode, you achieve full deployment of files and therefore generally a way faster Magento2 Store. You should also enable all the caches for maximum out of the box speed. Intended for deployment on a production system. Exceptions are not displayed to the user, exceptions are written to logs only, and static view files are served from
pub/static only. New or updated files are not written to the file system.
Switch to developer or production mode
In your terminal:
php bin/magento deploy:mode:set <mode>
Possible modenames are: