Storage Configuration for Media in Magento

core-file-storagesession

Recently I changed media storage from db to files via System > Configuration > System and synchronized.

It finished successfully but seems to have reverted back to saving product images in the database.

Do I also have to change <session_save><![CDATA[db]]></session_save> to <session_save><![CDATA[files]]></session_save> in app/etc/local.xml as well?

Best Answer

You should not need to modify that configuration setting. It is used to determine if user session data is stored in the File System (default) or in the database.

The setting you changed should make the required update once you hit run the "Sync" function, it should copy all of the files from the database to the file system then proceed to storing the assets on the file system.

This post provides a good explanation : What is core_file_storage table in Magento?

Try testing the following :

  1. Make sure logging is enabled on your installation. Go to System > Configuration in the Menu, then on the bottom left choose Advanced > Developer and expand the Log Settings tab. Select Enabled = Yes enter image description here

  2. Validate that the Admin panel still shows the configuration you made originally. If not, reset media storage to file system.

  3. Run the sync operation

  4. Navigate to media / catalog / product You should see folders in there based on the first letters of the images that are used in your product catalog. If you don't see the folders there, there was a problem with your sync operation.

  5. Check the var / log / system.log and exception.log files to see if there were any errors or warnings reported during the sync operation.

Normally, problems with the sync operation occur because of invalid permission settings on the directory where files are stored. If you're using a unix / linux file systems, the process running your webserver (usually apache or httpd) needs to have write permissions to the media folder.

Can you confirm what those settings are to help troubleshoot?