My first compilation of “pro” tips for Magento 2 deployment to a production environment. Actually, it is applicable to any framework, platform, product, whatever else you have to deploy. Please read it very carefully, share it, and always “follow” every time you plan to update servers :).
This is the first set of unique feedback and observations I started to collect while working with Magento 2. In case you have something to add, feel free to email me or write yours in comments.
Pro Tip #1
Skype is as important as GIT. This is a true statement when you are halfway through a manual production release during a peak period of your online business. Simply send a piece of code, preferably JavaScript or CSS to your colleague via Skype. This shouldn’t be really a file, just text message with the code. So, he or she will be able to easily copy and paste code via terminal (also known as SSH connection) to a production environment.
Pro Tip #2
Once everything is almost ready and you see a problem with JavaScript and for some reason, your Magento 2.x installation has “Merge JavaScript” option enabled, feel free to open this long file, usually it is about 5 MB. Find somewhere in a middle of it a function you want to modify and change it using code sent by your Magento colleague. No need to check it on production. After all this, Magento colleague will become your best friend :).
Pro Tip #3
If you want real “Production is on fire” experience you may also use start removing files and directories on a running production environment. Especially it might be more fun if there is no version control system behind. Simple type “rm -rf” (make sure to have f option – which stands for force) and select a file to delete. Examples of such files might be anything in /etc/ directory or Magento related files which aren’t part of GIT.
Disclaimer: All “Pro” tips are examples of practices which should be avoided when deploying to a production environment. It is listed for fun, however you should always remember to automate as much as time allows it.
Leave a Reply
You must be logged in to post a comment.