Craft/Magento Upgrade Process (Dev environment)
This checklist was used to upgrade craft and magento on 12-19-22 as part of PAP-6952
Craft 3 → 4 procedure
https://craftcms.com/docs/4.x/upgrade.html#preparing-for-the-upgrade
-- This might take the site down --
https://tecadmin.net/how-to-install-php-8-on-centos-rhel-8/
If you're in ddev just change the config.yaml file to read v 8.1 and do a
ddev restart
then you can skip this step
sudo dnf update -y
sudo yum install yum-utils
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.4.rpm
sudo dnf module list php
# Review php modules to confirm 8.0 is available
sudo dnf module reset php
sudo dnf module enable php:remi-8.0
sudo dnf module install php:remi-8.0
sudo dnf update --skip-broken --nobest #the RHEL we were given is locked to a weird version without subscriptions
sudo dnf install php-imagick
sudo dnf install php-bcmath
sudo dnf install php-intl
sudo chown -R php:php /var/lib/php/
CRAFT_SECURITY_KEY
in duplicate of the old SECURITY_KEY
mysqldump DBNAMEHERE -u USERNaMEHeRE -p -h 127.0.0.1 | gzip > /tmp/CraftCms_ENV_$(date "+%Y-%m-%d_%H%M").sql.gz
)craft_plugins
tablefeed_me_feeds
table for use later on the new tablerm -rf vendor
composer update
deploy.sh
This script is global on the dev server and it’s location can be found by which deploy.sh
This should do
npm install
php craft migrate/up --track craft
php craft project-config/apply
php craft migrate/all
npx mix
php craft setup/security-key
and/or check that nginx user can write to /var/lib/php
php craft plugin/install allow-list
php craft plugin/install azure-blob
php craft plugin/install blitz
php craft plugin/install ckeditor
php craft plugin/install feed-me
php craft plugin/install linkit
php craft plugin/install navigation
php craft plugin/install redactor
php craft plugin/install retour
php craft plugin/install seomatic
php craft plugin/install templatecomments
DataGrip copies booleans as empty because of its interface or something, so there's a few columns that need to be manually tweaked before it'll accept an insert. If you’re doing it that way
Magento 2.4.5 upgrade/deploy procedure
This script is global on the dev server and it’s location can be found by which deploy.sh
DELETE FROM setup_module where module='Smile_ElasticsuiteAdminNotification';
DELETE FROM setup_module where module='Smile_ElasticsuiteAnalytics';
DELETE FROM setup_module where module='Smile_ElasticsuiteCatalog';
DELETE FROM eav_attribute where attribute_code='use_name_in_product_search';
DELETE FROM eav_attribute where attribute_code='is_displayed_in_autocomplete';
ALTER TABLE catalog_eav_attribute DROP COLUMN is_displayed_in_autocomplete;
ALTER TABLE catalog_eav_attribute DROP COLUMN is_used_in_spellcheck;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_min_coverage_rate;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_max_size;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_sort_order;
ALTER TABLE search_query DROP COLUMN is_spellchecked;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_pattern;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_precision;
ALTER TABLE catalog_eav_attribute DROP COLUMN sort_order_asc_missing;
ALTER TABLE catalog_eav_attribute DROP COLUMN sort_order_desc_missing;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_boolean_logic;
ALTER TABLE catalog_eav_attribute DROP COLUMN is_display_rel_nofollow;
ALTER TABLE catalog_eav_attribute DROP COLUMN include_zero_false_values;
DROP TABLE smile_elasticsuitecatalog_category_filterable_attribute;
DROP TABLE smile_elasticsuitecatalog_search_query_product_position;
DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogGraphQl';
DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogOptimizer';
DELETE FROM smile_elasticsuite_optimizer where optimizer_id is not null;
DELETE FROM smile_elasticsuite_optimizer_search_container where optimizer_id is not null;
DROP TABLE smile_elasticsuite_optimizer_limitation;
DROP TABLE smile_elasticsuite_optimizer_search_container;
DROP TABLE smile_elasticsuite_optimizer;
DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogRule';
DELETE FROM setup_module where module='Smile_ElasticsuiteCore';
DROP TABLE smile_elasticsuite_relevance_config_data;
DELETE FROM setup_module where module='Smile_ElasticsuiteIndices';
DELETE FROM setup_module where module='Smile_ElasticsuiteSwatches';
DELETE FROM setup_module where module='Smile_ElasticsuiteThesaurus';
DROP TABLE smile_elasticsuite_thesaurus_expanded_terms;
DROP TABLE smile_elasticsuite_thesaurus_reference_terms;
DROP TABLE smile_elasticsuite_thesaurus_store;
DROP TABLE smile_elasticsuite_thesaurus;
DELETE FROM setup_module where module='Smile_ElasticsuiteTracker';
DROP TABLE elasticsuite_tracker_log_event;
DROP TABLE elasticsuite_tracker_log_customer_link;
DELETE FROM setup_module where module='Smile_ElasticsuiteVirtualCategory';
DELETE FROM eav_attribute where attribute_code='is_virtual_category';
DELETE FROM eav_attribute where attribute_code='virtual_category_root';
DELETE FROM eav_attribute where attribute_code='virtual_rule';
DROP TABLE smile_virtualcategory_catalog_category_product_position;
DELETE FROM eav_attribute where attribute_code='use_store_positions';
DELETE FROM eav_attribute where attribute_code='generate_root_category_subtree';