How to change base_url settings with phpMyAdmin

﹥>﹥吖頭↗ 提交于 2019-12-04 20:33:12

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

nazim10

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;
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!