In this article, I will explain how to use the maintenance mode in Magento 2. Normally it is used to restrict the access to the website during updates of any type, to improve user experience, as they will see a friendly message instead of possibly seeing an error message. That way the customers will know that the shop is not broken.
In many cases when creating extensions in Magento 2, it will be needed to add new menu items in the admin panel. This is quite easy, and I will show you how to do this and also add your custom icon to your main item, as you can also see in the hero image of this article.
Creating custom console commands can be very useful in Magento 2, especially for developers. The old fashion way in Magento 1 was to create external scripts in various folders or, the better way, in "shell/", however, if you had multiple "commands" you ended up having a lot of files.
By default, the admin session lifetime in Magento 2 is set to 900 seconds (15 minutes), and most of the time this is quite annoying. As this is a setting in the backend, we can change it quite easily.
Controllers are an important part of an extension if you want to create custom pages, either in backend or frontend. In this tutorial, we will create an admin controller and a frontend controller that will only return a text on the screen.
In this tutorial, we will build a basic extension for Magento 2. This extension will not work on its own. However it is the first step in the construction of any extension for Magento 2 of any type, and it is a mandatory step as well.