. , , ...
/app/etc/local.xml
, . local.xml:
- /etc/production.local.xml
- /etc/staging.local.xml
- /etc/my -dev.local.xml
local.xml, , . softlink local.xml :
cd app/etc
ln -s production.local.xml local.xml
:
/sql , , :
- createdb.sql
- production.setup.sql
- staging.setup.sql
- -dev.setup.sql
createdb.sql MySQL .
create schema magentoschema; create user magentouser;
grant all on magentoschema.* to 'magentouser'@'localhost';
set password for 'magentouser'@'localhost' = password('secret');
mysqldump :
mysqldump -u magentouser -p -h your.host.name magentoschema > magento.dump.sql
, :
mysql -u magentouser -p -h localhost magentoschema < magento.dump.sql
(, , ) core_config_data. :
update core_config_data set value='http://staging.yourstore.com/' where config_id in (3,4);
Magento, , config_id web/secure/base_url web/unsecure/base_url . , jsut , :
select * from core_config_data where value like 'http%';
, *.setup.sql script mysql , , :
mysql -u magentouser -p -h localhost magentoschema < staging.setup.sql
!