Tuesday, June 29th, 2010 - by Reviewer

  • Share
  • Share

Follow the instructions carefully without any mistake

This is the method I used to move my local copy of magento store from

wamp on windows to a shared hosting account. In my case am using magento1.3.x

Local/production Server Copy

  1. Login into Local copy of Magento and change configuration > web > unsecured link & sercured link to {{base_url}} usually it will be your basepath of local or production server
  1. This prevents errors with the file paths when you move the server and will be changed back later on.
  1. Change the cache settings in the configuration to refresh and save for to avoid cache problems.
  1. Open PHPadmin http://localhost/phpmyadmin/ or open your production server’s database admin and select your magento database to make a copy of your database.
  1. You are now going to export a copy of the database, also know as a dump. Use the following settings: Leave all the settings as they are but use the “save file as” and use compression none.

Live Server

  1. In your control panel for you live server, set up a new mysql database with the same dbname, username, password (is that is not possible we need to edit the db configuration)
  2. Unzip the your Magento Commerce downloaded file of same version which is running in the local onto root web folder(Live server)
  1. Install a fresh copy of magento using the same database settings
  1. After a sucessful install, connect to FTP and upload everything in the production media folder and any template files you changed onto the live server, making sure that the file permissions are correct (i.e 777).
  1. Delete the var/cache and var/session folder from Live Server
  1. Login to the control panelfor for you mysql database (phpmyadmin in my case) and delete all the tables in you new magento database but not the database itself!
  1. Import your old magento database using the Import Tab and following the steps.
  1. Log into the magneto manager, and now change the {{base_url}} settings to reflect you new domain i.e www.twozao.com/magento
  1. And finally give the cache settings a refresh.
  1. Copy over your Themes/Templates, Skins, Images, and Custom Modules from production to live.
  1. Once complete, check your url and you should see your old site on the new server without any errors. If not then you have to check through all the above steps carefully.

In case of your Database configuration is different or if you are facing config problems then follow these instructions

  1. You may need to fix up the configuration file in order to adjust all database related settings. It’s located in /path/to/your/magento-install/app/etc/local.xml
  1. Certain directories will need to be made writable. Writable in this case means that the webserver has to be able to write into it. Since most of the standard PHP setups are with mod_php, this will be the user www, apache or www-run (in most cases). If you (or your provider) runs php-cgi, chances are that this is not necessary.You may have to use chmod 777 to these, but for obvious reasons this may be risky in a shared environment.The following is a list of directories (and contents) which need to be made writable:
    • app/etc/
    • var/
    • media/

    And in case you want to use MagentoConnect, there are additional directories to make writable as we already set make media,var,etc to be 777.

  1. Update the secure/unsecure urls to match your new domain / setup
    These settings are saved in the
    magento_core_config_data table.
    The two settings you need to alter are
    - web/unsecure/base_url
    - web/secure/base_url

These are db hacks , so unless you are sure dont try it.

  • Sometimes the foreign key constraints break tables on import. The most common are :
    - magento_customer_group
    - magento_core_website
    - magento_core_store
    - magento_core_store_group

    Just check your old setup and update those tables by hand.

    You can run queries by activating and deactivating the foreign key check like this:

    SET FOREIGN_KEY_CHECKS=0;

    INSERT INTO `magento_core_website` (`website_id`, `code`, `name`, `sort_order`, `default_group_id`, `is_default`) VALUES
    (0, ‘admin’, ‘Admin’, 0, 0, 0),
    (1, ‘base’, ‘Main Website’, 0, 1, 1);

    SET FOREIGN_KEY_CHECKS=1;

  • Make sure to delete the following folders before you try to access the install again
    - var/cache
    - var/sessions

Still write permission or any problem check this also.

For example, after moving a store from a linux to a BSD (essentially a different WWW user id), Magento Connect just died with “Error: Please check for sufficient write file permissions”.

Anyhow — debugging in downloader/Maged/Controller.php (Maged_Controller::isWritable()), here’s a list of files and directories that need to be made writable so Magento Connect gets to work:

/path/to/your/magento-install

/path/to/your/magento-install/downloader

/path/to/your/magento-install/downloader/config.ini

/path/to/your/magento-install/downloader/pearlib/config.ini

/path/to/your/magento-install/downloader/pearlib/pear.ini

/path/to/your/magento-install/downloader/pearlib/php

And we will be updating more problems ans solutions here.

Note :

If you are facing hosting specific problems like .htaccess problems,js loading please refer with your hosting provider like godaddy, 1and1, ipage.

New Installation of magento in live server

    • Just grab your version of magento from magento download section and upload it to your new domain either through ftp or through admin panel and extract it.
    • So now you are having the ready to install copy of magento in your new server

And it is always advisable to keep note of what ever you are proving details to magento installer because these all are details which are needed in future.

Baseurl : your new server address

host : hostname of your db
password : password of your db
db name : db for magento (Should be created like this )

And in the end it will give encryption key , so please store it.


encryption key :7cc7c0d41cccf004a47682831366c95a

provide your admin name and password

For detailed info please check all these screen-shots

Open your magento install url in browser

Initial Screen


Configuration


In the end you will be getting this screen


So thats it about installing magento. Now you need export your old database and import it into the new server.

This is for importing and exporting using phpmyadmin


Choose sql format and save it in your system.



If you want to import magento db into the live server follow the steps

Place these lines of SQL code on very top of the .sql file:

SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
SET NAMES utf8;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;

Place these lines of SQL code on very end of the .sql file:

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;
SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;
SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;
SET SQL_NOTES=@OLD_SQL_NOTES;

So now you done, it was working perfectly for me, if not for you leave the comment and i will update it.

excellent-poker-journals
daily-casino-reviews
online casino brands club
online casino expert directory

Tags: ,
Category : Uncategorized

2 Responses to “How to move Magento from Production to Live Server”

  1. Gadget Newz says:

    [...] How to move Magento from Production to Live Server [...]

Leave a Reply