質問

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!

役に立ちましたか?

解決

Take a look @ http://www.magentocommerce.com/wiki/recover/restore_base_url_settings

  1. Open your core_config_data table in phpMyAdmin.

  2. Find the following rows for your unsecure section, they should look like the following:

    PATH                    VALUE
    web/unsecure/base_url   http://www.mydomain.com/
    
  3. 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.

他のヒント

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

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.

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;
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top