wget sys.sonassi.com/mage-dbdump.sh && chmod +x ./mage-dbdump.sh
wget https://files.magerun.net/n98-magerun.phar && chmod +x ./n98-magerun.phar
sudo perl -pi -e 's/`old_user`@`172.16.0.%`/`new_user`@`localhost`/g' *.sql
sed -i 's/ROW_FORMAT=FIXED//g' magento-db-dump.sql
Full details: https://magento.stackexchange.com/questions/94325/how-to-fix-mysql-error-1031
select * from core_config_data where path in ('web/unsecure/base_url', 'web/secure/base_url');
update m_core_config_data set value = 'http://graphics-direct.local/' where path in ('web/unsecure/base_url', 'web/secure/base_url');
update core_config_data set value = 'http://ribble.local/' where config_id IN (1439,1440);
select * from core_config_data WHERE path = 'web/cookie/cookie_domain';
update core_config_data set value = 'two-wests-elliott.d.vortexcommerce.com' where path = 'web/cookie/cookie_domain';
select * from core_config_data where path like '%base_%_url%';
update core_config_data set value = '{{unsecure_base_url}}skin/' where config_id in (73,77);
update core_config_data set value = '{{unsecure_base_url}}media/' where config_id in (74,78);
update core_config_data set value = '{{unsecure_base_url}}js/' where config_id in (75,79);
<?php
Mage::log([__METHOD__, __LINE__, __FILE__, '' => ], Zend_Log::DEBUG, 'sla.log', true);
Mage::log($name, Zend_Log::DEBUG, 'events.log', true);
$handles = Mage::getSingleton('core/layout')->getUpdate()->getHandles();
Mage::log([__METHOD__, __LINE__, __FILE__, 'handles' => $handles], Zend_Log::DEBUG, 'handles.log', true);
Mage::log([__METHOD__, __LINE__, __FILE__,
'fieldset' => $fieldset,
'aspect' => $aspect,
is_object($source) ? get_class($source) : 'source' => $source->getData(),
is_object($target) ? get_class($target) : 'target' => $target->getData(),
], Zend_Log::DEBUG, 'sla-4683.log', true);
Mage::log([__METHOD__, __LINE__, __FILE__,
$eventName,
'fieldset' => $fieldset,
'aspect' => $aspect,
is_object($source) ? get_class($source) : 'source' => $source->getData(),
is_object($target) ? get_class($target) : 'target' => $target->getData(),
], Zend_Log::DEBUG, 'sla-4683.log', true);
?>
- MySQL useful commands
# Setup new db:
# To export to file (schema only)
mysqldump --no-data mydb > mydb.sql
# To export to file (data only)
mysqldump --no-create-info --skip-triggers mydb > mydb.sql
# To export only specific tables
mysqldump mydb table1[ table2 tableN] > mydb.sql
# Check db name first:
head <dump>.sql
# Create database
mysql -e 'CREATE DATABASE mydb';
# Import SQL dump
mysql mydb < <dump>.sql
# Don't dump schema
--no-create-info
# Don't dump triggers
--skip-triggers
# Don't dump specified table
--ignore-table=mydb.table1
Don't forget to add a new hostname to the hosts file
Remember to chmod the following directories:
chmod -R 777 var/ media/ app/etc/
(app/etc/ is only necessary if using the installer)
update admin_user set failures_num=null,first_failure=null,lock_expires=null where user_id = 16;
select * from enterprise_url_rewrite WHERE request_path = ''
update core_config_data set value = 1 where path = 'dev/log/active';
update core_config_data set value = 1 where path in('dev/debug/template_hints', 'dev/debug/template_hints_blocks');
// Show available indexers
# php indexer.php info
// Show index statuses
# php indexer.php status
// Reindex all indexes
# php indexer.php reindexall
Search for all instances of class names called directly (excluding class names starting with Varien or Zend, which have to be loaded directly):
= new (?![Varien_|Zend_|PEAR])[A-Za-z]{1,}_[A-Za-z]{1,}_[A-Za-z]{1,}
Matches '= new Mage_Sales_Model'
in:
$order = new Mage_Sales_Model_Order($something);
but ignores:
$uploader = new Varien_File_Uploader($name);
$client = new Zend_Http_Client();
<\?=
If you ever get the 'ERR (3): Warning: Illegal string offset 'value' in /app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php on line 111' error when switching config scopes, insert this on line 111:
} elseif (isset($v['value'])) {
if ($v['value']==$defText) {
$defTextArr[] = $v['label'];
break;
}
}
Just export the XDEBUG_CONFIG variable:
export XDEBUG_CONFIG="idekey=PHPSTORM"
Remember to enable Xdebug first:
/var/www/html/magento2-deployment/dev/enable-xdebug-php70.sh && export XDEBUG_CONFIG="idekey=PHPSTORM"