DRAJI
DRAJI

Reputation: 1869

How to change base_url settings with phpMyAdmin

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!

Upvotes: 1

Views: 12777

Answers (5)

Eternal21
Eternal21

Reputation: 4694

I've hit this issue when working with phpmyadmin that's being accessed by an Ingress Nginx in a Kubernetes cluster. The solution was setting the following env variable inside PhpMyAdmin pod to the new base url: PMA_ABSOLUTE_URI

Upvotes: 0

Craig Wayne
Craig Wayne

Reputation: 5068

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;

Upvotes: 0

nazim10
nazim10

Reputation: 129

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.

Upvotes: 1

MagePal Extensions
MagePal Extensions

Reputation: 17656

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.

Upvotes: 9

blmage
blmage

Reputation: 4214

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

Upvotes: 3

Related Questions