views:

1202

answers:

5

Uploading a Magento install

I have spent a long time building a store with Magento on my local development PC.

Now that I am happy with the result, I would like to upload it to my live production server.

What steps must I complete to ensure this move is as easy as possible?

+2  A: 

Best way would be to make a fresh install.

Change the URL of the site to the live one before exporting the database. Import your database into the live server. Download and unzip the Magento files. Edit the etc/local.xml file to set the database details.

Once you visit the URL, Magento will do all the required Database fixes and upgrades.

Copy the template into the folders.

Reinstall all modules (if you've used any).

You can move the site by other ways too... Check the following links.

Ref: http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server http://www.magentocommerce.com/wiki/how_to/moving_magento_to_another_server http://www.magentocommerce.com/boards/viewthread/27272/ http://activecodeline.com/moving-magento-site-from-development-to-live-server http://abhinavzone.com/moving-magento-site-from-development-server-to-live-server/

Sid Vel
Thanks for the answer! Unfortunately a fresh install was not an option for me as I had made some changes to core files.
Jon Winstanley
+3  A: 

moving files and database

I assume these two steps are obvious:

  1. copy all of your local files to production server
  2. dump your magento local db and import it into your production server db

editing in production server

now on your production server you need to follow these two steps:

  1. edit app/etc/local.xml file and change database info

  2. in production db,in its core_config_data table, you should find every records containing the url of your local installation, then you need to update those values;which can be found with this query:


     SELECT *
     FROM `core_config_data`
     WHERE `value` LIKE 'http://%';

edit (thanks to comments):
3. Do not forget to delete var folder contents
4. it'd better if you remove the content of app/etc/use_cache.ser too

cubny
Thanks, worked a treat. Noted though that I needed to delete the contents of the var directory
Jon Winstanley
Yes. Make sure you delete the contents of the var directory.
Sid Vel
+2  A: 

Don't change core files, instead either overload them via custom modules or, if absolutely necessary, replicate them in the app/local folder, which ensures that the modified versions get loaded instead of the standard files.
Deployment is handled like this:
I keep all Magento source files under version control, Subversion specifically. When I've tested my changes, I just submit them to the Subversion server and then export (or update) them on the production server. That way, I don't need to upload the whole site again, only the changed files get updated. Using the auto-installing extensions mechanism ensures that extensions are installed on the production server as they were on the development server. The only thing that's needed now is to adjust database settings for the new extensions on the production server (something that can also be handled by the extensions mechanism).

demonkoryu
A: 

I recently moved a full Magento install complete with a couple of extensions. I found it as simple as copying the directory structure, changing the BASE_URL in config_data and changing the database info in 'local.xml'.

Jack Shepherd
A: 

Its very easy to do, i did it and i made a document of it. all you have to do is add these lines in your sql file.

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;

for more details

http://findgodaddyhostingreview.com/2010/06/how-to-move-magento-from-production-to-live-server/

Ela