问题
i have changed base_url in magento back end. Now my website is inaccessible
How to change base_url settings with my phpMyAdmin?
Thanks in advance!
回答1:
Take a look @ http://www.magentocommerce.com/wiki/recover/restore_base_url_settings
Open your core_config_data table in phpMyAdmin.
Find the following rows for your unsecure section, they should look like the following:
PATH VALUE web/unsecure/base_url http://www.mydomain.com/
Replace
http://www.mydomain.com/
with your appropriate domain url (trailing slash necessary) and if you’ve installed in a subfolder append it with a / after it.
回答2:
In your database, go to the core_config_data
table and set the right value
for those path
values : web/unsecure/base_url
and web/secure/base_url
回答3:
If you change Base Url of your site which you set at the time installing Magento then there are possibilities that you can’t get the login page of Magento because you set invalid address for base url.Try the following to overcome from this problem:
Open core_config_data table from your Magento database tables in PhpMyAdmin Tool.
Now set the base url in web/secure/base_url and web/unsecure/base_url.
After performing all the above steps you need to delete cache files inside var/cache folder in root directory and also session files.
回答4:
if you're willing to do it via mysql command line: open up terminal...
mysql -uroot;
Copy and paste the following into your terminal but make the necessary changes... obviously...
SET @db = 'your_magento_db_name';
SET @old_url = 'old_url';
SET @new_url = 'new_url';
SET @q = CONCAT('UPDATE ', @db, '.core_config_data SET value = REPLACE(value,"',@old_url,'","',@new_url,'")');
PREPARE stmt FROM @q;
EXECUTE stmt;
SET @q = CONCAT('SELECT * FROM ',@db,'.core_config_data WHERE value LIKE "%',@new_url,'%"');
PREPARE stmt FROM @q;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
来源:https://stackoverflow.com/questions/16940717/how-to-change-base-url-settings-with-phpmyadmin