简体   繁体   中英

Magento: domain change from old to new domain and hosting troubles

There are troubles when uploading backup of old website domain to new hosting domain. Now I got many errors and it seems it is with the database . Problem is that, that I do not understand how does SQL working . And also it's looks like that new domain complaining with old domain name. It means I need to change it somewhere? Thank you for your answers! Here is error list :

SQLSTATE[HY000] [1045] Access denied for user 'liveshop_epc'@'localhost' (using password: YES)

Trace:
#0 /home/domain/domains/domain.com/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/domain/domains/domain.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(313): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/domain/domains/domain.com/public_html/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/domain/domains/domain.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/domain/domains/domain.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Resource/Cache.php(53): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Cache.php(455): Mage_Core_Model_Resource_Cache->getAllOptions()
#12 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Cache.php(497): Mage_Core_Model_Cache->_initOptions()
#13 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/App.php(1183): Mage_Core_Model_Cache->canUse('config')
#14 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Config.php(414): Mage_Core_Model_App->useCache('config')
#15 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#16 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/App.php(413): Mage_Core_Model_Config->loadModulesCache()
#17 /home/domain/domains/domain.com/public_html/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#18 /home/domain/domains/domain.com/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#19 /home/domain/domains/domain.com/public_html/index.php(87): Mage::run('', 'store')
#20 {main}

There are some things that is needed to be modified while changing your domain and hosting.

  1. After you uploaded the database Go to your phpmyadmin and on your database search for the table "Core_Config_Data".In this table you need to modify the "web/unsecure/base_url" and "web/secure/base_url" to your website url such as "www.yourdomain.com" .
  2. Next thing you need to do is Go to your project folder and navigate to "app/etc/local.xml", here you need to change some information such as your host,username,password and database name.

That's it. Proper configuration of this should work.If not then should check other issues.

Hope this will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM