Latest Tweets

How to move Magento to another domain?

These are some typical problems you may face if you need to move your Magento site to other domain:

- You have already restored your Magento DB dump onto your new DB, configuration changes are done but Magento won't start. The only thing you see is a screen like this:

Magento problem 

You can access the install screen but you only see the message:

The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. * This problem can sometimes be caused by disabling or refusing to accept cookies. 

- The first thing we are going to check is the URL on "web/secure/base_url" and "web/unsecure/base_url" on "core_config_data" table:

magento_problem_03.jpg 

 

- But what if the data there are properly set, as in the screenshot?

In this
case, it's likely that during the import process of the DB. Some IDs (PK) in  MySQL, for which Magento expects a value of 0, were increased automatically by MySQL.
The common ID's that get incremented are these:
  • core_store: the store_id the admin must be 0. Commonly increased to 2.
  • core_store_group: the group_id for the default must be 0. Commonly incresed to 2.
  • core_website: the website_id for admin must be 0. Commonly incresed to 2.
  • customer_group: In this case, the  customer_group_id for the customer_group_code 'NOT LOGGED IN', must be 0.
- How to fix this problem?
The better way to fix is adding this at the beginning of the dump file after the "USE" command like this:

CREATE DATABASE IF NOT EXISTS `magento_1_4_db`;
USE `magento_1_4_db`;
SET sql_mode='NO_AUTO_VALUE_ON_ZERO';
 

And re-import the dump.

- Now, what happens if this doesn't resolve the problem and you still get a blank screen?

Well, sometimes if the ion_cube library isn't installed, you can get this kind of error, so, verify that you have all the PHP libraries required by Magento.

All done!

Author

PHP Developer
Always giving my best.

Add comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.