Skip to content

Instantly share code, notes, and snippets.

View sergiojovanig's full-sized avatar

Sergio Jovani sergiojovanig

View GitHub Profile
@sergiojovanig
sergiojovanig / magento2-clear.sql
Last active January 15, 2024 12:25
Magento 2 Clear Database
##########################################################
# PRODUCTS
##########################################################
DELETE FROM `catalog_product_bundle_option`;
DELETE FROM `catalog_product_bundle_option_value`;
DELETE FROM `catalog_product_bundle_selection`;
DELETE FROM `catalog_product_entity_datetime`;
DELETE FROM `catalog_product_entity_decimal`;
DELETE FROM `catalog_product_entity_gallery`;
DELETE FROM `catalog_product_entity_int`;
@sergiojovanig
sergiojovanig / Capfile
Last active August 31, 2016 09:57
Capistrano Magento 2 tasks
require "capistrano/setup"
require "capistrano/deploy"
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
@sergiojovanig
sergiojovanig / magento2-deploy.sh
Last active March 18, 2021 12:36
Deploy Magento 2 steps
php bin/magento setup:backup --db
gzip var/backups/*.sql
git pull
php bin/magento maintenance:enable
php bin/magento cache:enable
rm -fr var/di var/generation var/cache
php bin/magento setup:di:compile
php bin/magento deploy:mode:set production --skip-compilation
php bin/magento maintenance:enable
php bin/magento setup:upgrade