Magento SQLs

-- update magento directory path
UPDATE core_config_data SET VALUE = 'http://www.example.com/shop/' WHERE PATH = 'web/unsecure/base_url';
UPDATE core_config_data SET VALUE = 'https://www.example.com/shop/' WHERE PATH = 'web/secure/base_url';
 
-- Dont forget to clear cache!
rm -r var/cache/ var/session/
 
-- 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';
 
-- 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';