This is the 2.3 Beta release version of Magento documentation. Content in this version is subject to change. For additional versions, see Magento Documentation and Resources
Using a Database
Browser requests media. A page from the store opens in the customer’s browser, and the browser requests the media that is specified in the HTML.
System looks for media in file system. The system searches for the media in the file system and if found, passes it to the browser.
System locates media in database. If the media is not found in the file system, a request for the media is sent to the database that is specified in the configuration.
System locates media in database. A PHP script transfers the files from the database to the file system, and sent to the customer’s browser. The browser request for media triggers the script to run as follows:
- If web server rewrites are enabled for Magento and supported by the server, the PHP script runs only when the requested media is not found in the file system.
- If web server rewrites are disabled for Magento, or not supported by the server, the PHP script runs anyway, even if the required media is available in the file system.
To use a database for media storage:
|1.||On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.|
|2.||In the panel on the left, under Advanced, choose System.|
|3.||In the upper-left corner set Store View to “Default Config,” to apply the configuration at the global level.|
|4.||Expand the Storage Configuration for Media section. Then, do the following:|
Storage Configuration for Media (Database)
|a.||Set Media Storage to “Database.”|
|b.||Set Select Media Database to the database you want to use.|
|c.||Tap Synchronize to transfer the existing media to the newly selected database.|
|d.||Enter the Environment Update Time in seconds.|
|5.||When complete, tap Save Config.|
A quick rating takes only 3 clicks. Add a comment to help us improve Magento even more.