Thursday, December 17, 2015

How to configure Magento to work with a new domain

There are two things you should do to configure Magento with a domain: By editing the Magento database - Open your cPanel > phpM... thumbnail 1 summary
There are two things you should do to configure Magento with a domain:

magento

  • By editing the Magento database -
Open your cPanel > phpMyAdmin. Browse your Magento database from phpMyAdmin, select the table called core_config_data and edit the first two fields:
web/unsecure/base_urlweb/secure/base_url
by editing of each of them replace your old domain name with your new one.
  • Clear the Magento cache.
From your Magento installation directory > /var/cache. Simply delete the folder.
Many Magento issues can be fixed just by deleting the cache.

Wednesday, December 2, 2015

How to change Magento base URLs

  This article gives three methods to change Magento Base URLs through PHPMyAdmin and the command line.   Method 1: Change Magento ba... thumbnail 1 summary

 
Magento base url

This article gives three methods to change Magento Base URLs through PHPMyAdmin and the command line. 

 Method 1: Change Magento base URLs in Magento Admin Panel

  1.  Log in to your Magento Admin Panel (Figure 1).
Magento Login
Figure 1. Magento Admin Panel.
  1. On the upper right, click System > Configuration.
 
Figure 2. System > Configuration.
  1. From the menu on the left, under the General list, click Web (Figure 3).
 
Figure 3. General > Web.
  1. Open the Unsecure and Secure dropdowns, locate the base URL line, and replace this with the new URL.  
  2. Clear the Magento cache and your browser's cache. The site should now load properly.   

Method 2: Change Magento base URLs with PHPMyAdmin

  1. Log in to your SiteWorx account.
  1. From the menu on the left, click Hosting Features MySQL > PhpMyAdmin (Figure 4).
Figure 4. Hosting Features MySQL > PhpMyAdmin.
  1. You will see the main menu for phpMyAdmin. On the left side of the screen, locate and click the name of the Magento database corresponding to URL you want to change.   


    Figure 5. Magento database selection.
  1. You will see a list of all the tables in the database in alphabetical order.  Search for the core_config_data table and click Browse (Figure 6).


    Figure 6. List of tables and core_config_data table.
  2. Expand the viewing area of phpMyAdmin. At the top and bottom in the main panel, locate the grey box and change theNumber of rows to a larger number, such as 100.
 
Figure 7. Number of rows field.
  1. Locate the rows web/unsecure/base_url and web/secure/base_url and click Edit next to the corresponding lines.  Change the base URL to the intended string, and click OK.
  2. Within the Value column, update the value of each specific secure and unsecure URL to the intended URL.
  3. Flush the Magento cache, and the site should load with the set base URLs properly now.   

Method 3: Change Magento base URLs with the command line

Attention: Do not attempt to change the base URLs unless you are familiar with the command line and MySQL queries. 
  1. Use SSH to log in to the server hosting the Magento installation's database. 
  2. Enter the following command, where $database_user is the database user and $database_name is the database:
    • mysql -u $database_user -p $database_name
  3. Enter your password when prompted.
  4. Access their database using the following commandwhere database is the database name.
use database
  1. Run the following command: 
select * from core_config_data where path like '%base%url%';
      5.  This will display the current base_urls set in Magento.
      6.  To change the base URLs, execute the following commands:
update core_config_data set value = 'http://domainname/' where path = 'web/unsecure/base_url';
update core_config_data set value = 'http://domainname/' where path = 'web/secure/base_url';

How to change you database or mysql settings for Magento?

  First you will need to open your FTP or SHELL client and navigate to the following folder. Open the folder and edit the code. /app/... thumbnail 1 summary
Magento shell client

 

First you will need to open your FTP or SHELL client and navigate to the following folder. Open the folder and edit the code.

/app/etc/local.xml

The code you see should look very similar to the following. Simply modify the settings and save.

<connection>
   <host><![CDATA[localhost]]></host>
   <username><![CDATA[database_username]]></username>
   <password><![CDATA[database_password]]></password>
   <dbname><![CDATA[database_name]]></dbname>
   <active>1</active>
</connection>

Important: Only change the values within the CDATA brackets.