In the default installation of Magento 2 Open Source, images, compiled CSS files, and JS files of the Magento instance are saved in the file system on the server. Store administrators can store these files in a database on a database server. This method allows you to select between auto-sync and reverse-sync between the web server file system and the database. You can use the default database to store media or create a new one. To use a newly created database as media storage, you must include information about it and its access credentials in the local .xml file.
The database workflow of using database In Magento 2 media files storage below:
Browser requests media: The browser requests the media that is specified in the HTML while opening a page in the store on the browser.
The system looks for media in the file system: The media files will be searched and found in the file system and send to the browser.
The system locates media in database: If the file is not available in the system, a request is sent to the database that is specified in the configuration.
The system locates media in database: A PHP script sends the files from the database to the file system and sent to the browser.
If the server is supported and web server rewrites are enabled for Magento, the PHP script runs only when the requested media files are not in the file system.
If the server is not supported or web server rewrites are disabled for Magento, the PHP script runs even if the requested media files exist in the file system.
To configure a database for media storage, please follow these steps:
On the admin sidebar click Stores, under Settings click Configuration, under Advanced, click System. To apply the configuration at the global level, set Store View to Default Config. Open the Storage Configuration for Media tab and follow these steps:
Uncheck the Use system value checkbox
Set Media Storage to “Database.”
Set Select Media Database to the database you want to use.
Click Synchronize, enter the Environment Update Time and click Save Config.
In the next article, we will describe tutorial on using a CDN as a media storage for Magento 2 online store. Keep tracking Magestandard and see you in the next blog post.
In the previous articles, we described everything about controlling the administrators’ management system, including how to add users, unlock users and creating user roles in Magento 2 admin panel. This article will describe the alternate media storage method in Magento 2.
In Magento 2 default installation, you have two primary option to save media files:
The first method is you can store media files in a database on a database server, or the second method is you can store the media files on a Content Delivery Network (CDN) instead of saving media files on the file system of the web server. The advantage of saving media files in a database on the alternate media storage such as a database server or Content Delivery Network limits the effort required to sync media when multiple instances of the system that are deployed on other servers that need access to the same images, CSS files, and other media files. The advantage of store media files on the database server is the selection of auto-sync and reserve-sync between the web server file system and the database.
Each one of these alternate media storages has a specific workflow and also have a specific way to configure. You can do a configuration for both two alternate media storages in Magento 2 admin panel, and we will provide more detail tutorial for these alternate media storages in the next two articles, so you will not confuse in configuring alternate media storage.
Above is an article on two alternate media storages in the default installation of Magento 2 Open Source. We hope that you will know the critical detail of media storage, and prepare a basic knowledge on configuring database and CDN. On the next two articles, we will describe information on using the database for media storage and using a Content Delivery Network. See you in the next blog post.
To restrict the right to access admin of user, first, you have to create a role that has the specific level of permission. Then you save the role and assign users the restricted role to grant them limited access to the Admin.
To set up a role, you have two steps, but first, you have to open the User Roles table:
On the admin sidebar, click System > Under Permission click User Roles > Click Add New Role then follow these steps
Step 1: Define the Role
Enter required information to Role Name and Your Password.
Step 2: Assign Resources
Don’t forget to disable access to the Permissions if you are restricting access for a given role. Otherwise, users will be able to modify their permissions.
Set Role Scopes to All or Custom.
Under Roles Resources, set Resource Access to “Custom.”
In the folder tree, mark the checkbox of each Resource that the role can control.
Click Save Role after completed and the role will display in the grid to be assigned to new user accounts.
To edit a role:
In the Roles table, open the record in the edit mode.
Enter your password and click Role Users.
To search for a specific user record, you can use the search filter, to return a full list, click Reset Filter
Tick the checkbox of users to be assigned to the role, then click Save Role
Above is a tutorial on how to set up user roles in Magento 2 admin panel. We hope that you can control the administrators manage the system in Magento 2 platform correctly and effectively. In the next articles, we will describe the other media storage, using database and CDN. Keep tracking Magestandard by subscribing to our blog to read more Magento 2 tutorial article. See you in the next blog post.
On the previous article, we described the tutorial on adding an admin user to the Magento 2 shopping website. When there are many admin accounts, the problem is sometimes you may forget the admin password, or someone tried to login the admin account without the password. For security reason, Magento default installation provides a function that after six failed attempts to log in to the Admin, the system will lock the account and list the account name in the Locked Users grid. You can unlock the account with full Administrator permissions. This article will guide you to unlock the admin account in Magento 2 admin panel.
To unlock the admin account in Magento 2, you can follow these steps:
On the admin sidebar click System > Under Permission click Locked Users. A grid list of locked account will display
In the grid, tick the checkbox next to the locked account. In the upper left of the grid, set the action to unlock and click the Submit button. And your job is done.
We recommended you to use a strong password with at least 7 characters long (20 characters to avoid brute-force attack), including a combination of letters, numbers, and symbols. You can implement additional password security solutions in the Advanced Admin configuration. The Advanced Admin allows store administrators to configure Admin User Emails, Admin Base URL, CAPTCHA to make your online store secure.
For further information, please read this article: How To Configure Admin Security In Magento 2 Admin Panel.
Above is a tutorial on how to unlock an admin account in Magento 2. We hope that you will keep your password account better and make your website more secure, after reading this article. In the next article, we will describe the User Roles in Administrators system of Magento 2 platform. Don’t forget to subscribe Magestandard to tracking more Magento 2 articles. See you in the next blog post.
In the default installation of Magento 2, an Admin account is created that gives you full administrative access. First, you have to create another user account with full Administrator access, so you can use one account for your everyday Administrative activities, and reserve the other as a “Super Admin” account in case you lost access to your main account.
For a team of administrators, you can create a separate account for each, and set restrict access based on their business. To do that, you have to create a role with limited scope and access only to the necessary resources and assign the role to an admin account. After assigned to a restricted role, admin users can see and change data only for websites or stores that are associated with the role, but cannot make changes to any global settings or data.
Step 1: Create a New User
On the admin sidebar click System > All Users > Add New User. Follow these steps:
Enter all required information and set “This account is” as Active, enter your password under Current User Identity Verification.
Step 2: Define the Role
On the left of the panel, click User Role. In the Assigned column, tick the Administrators selection and click Save User.
Admin Password Requirements
Length of the password must be seven or more characters long, include both letters and numbers. For further information, please read this article: How To Configure Admin Security In Magento 2 Admin Panel.
Above is a tutorial on adding users in Magento 2 admin panel. We hope that you can manage the Administrators function in Magento 2 installation, and run your online store smoothly. In the next article, we will describe one of the most security function of Magento 2 platform: Lock Admin Account. Keep tracking Magestandard by subscribing to our site to read more Magento 2 tutorial blog post. See you in the next article.