preloder

Magento 2 Tips for Code Deployment

Prev Next

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.

Max with his team of Magento enthusiasts won the Best Magento 1 to Magento 2 Migration Award at the Magento Imagine 2017. As CEO at Pronko Consulting, he is actively working with Magento 2, delivering superior customer experience. As one of the most famous developers on a market and in the Magento Community, he launched Magento 2 blog, Magento DevChannel – YouTube channel in 2017 where he shares his knowledge, experience and the best practices in the Magento field.

Posted on Oct 8, 2016

The Devletter

Subscribe to my Magento 2 tips and tutorials content.
Every week I send an interesting email directly to your inbox

Related Posts

Show
Hide
Pre-order the Magento 2 payment integration course TODAY PRE-ORDER
Hello. Add your message here.