$ curl -o n98-magerun.phar \
https://raw.githubusercontent.com/netz98/n98-magerun/master/n98-magerun.phar
$ chmod +x ./n98-magerun.phar
$ sudo mv ./n98-magerun.phar /usr/local/bin/n98-magerun
The n98 magerun cli tools provides some handy tools to work with Magento from command line.
n98-magerun db:dump
n98-magerun media:dump
scp user@host:/path/to/the/file /local/path
set $basepath "/Users/roc/Sites";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "(.*\.dev$)") {
set $domain $1;
set $rootpath "${domain}";
set $servername "${domain}";
}
server_name $hostname;
root $basepath/$rootpath;
Configure Nginx / Apache to simply map domain to web root directory, so you won't need configure the web server any more when adding a new Magento site.
n98-magerun sys:check
modgit add aoe_templatehhints git@github.com:AOEpeople/Aoe_TemplateHints.git
Magicento is a PHPStorm plugin for Magento developers. Features include:
Goto for factories and template paths, autocomplete for factories, xml files and class names, documentation for xml nodes, evaluation of PHP code inside Magento environment, and much more!
Enable PHP errors in php.ini: display_startup_errors = On; display_errors = On; html_errors = On; log_errors = On; error_log = /your/preffered/log/path/system.log; Enable Magento Developer Mode: Nginx: fastcgi_param MAGE_IS_DEVELOPER_MODE "true"; Apache: SetEnv MAGE_IS_DEVELOPER_MODE "1"
Edit xdebug.ini:
[xdebug]
zend_extension="/usr/local/opt/php54-xdebug/xdebug.so"
xdebug.profiler_enable=0
xdebug.remote_autostart=0
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.idekey = "PHPSTORM"
xdebug.max_nesting_level=200
n98-magerun.phar cache:clean
n98-magerun.phar cache:flush
n98-magerun.phar index:reindex:all