Magento SQLs

-- update magento directory path
UPDATE core_config_data SET value = 'http://www.example.com/' WHERE path = 'web/unsecure/base_url';
UPDATE core_config_data SET value = 'https://www.example.com/' WHERE path = 'web/secure/base_url';

-- enable ssl on fronted and backend
USE magento;
UPDATE core_config_data SET value = 1 WHERE path = 'web/secure/use_in_frontend';
UPDATE core_config_data SET value = 1 WHERE path = 'web/secure/use_in_adminhtml';

-- clear cache
rm -r /var/www/var/cache/ /var/www/var/session/

-- disable cache
UPDATE core_cache_option SET value = 0;

-- disable redirect to shopping cart
INSERT INTO core_config_data(path, value)
VALUES ('checkout/cart/redirect_to_cart', '0')
ON DUPLICATE KEY UPDATE value = '0';