Moving from Development to Live

I’ve been designing a custom theme and tweaking settings for my client’s cart on one of my development domains. We are nearing the time of “launch” and I’m hoping someone can provide clear instructions regarding migration.



I understand how to upload my custom skin and activate it. Specifically, I’d like to know how to export the database so all the settings are intact upon installation in the live environment. I’ve just tried an experiment of backing up the database and importing it into a local installation. The database restore failed, of course.



If it is in the user guide and I’ve overlooked it, you can send me a “bad dog” for not reading it more thoroughly. Otherwise, please provide a little direction here. I’m trying to avoid a scenario of having to re-do everthing after installing cs-cart on the live domain and importing the database seems to be the way to do this.

Restoring the backup copy of the database to the new database through the admin over html might timeout on you and most likely will. The best way to restore the backup is to use SSH and log directly into your mysql database and restore it that way. This is assuming you are on a linux box with mysql, but even if not you can still do the same thing via similar methods on whatever server type you are running.

For the time being, I am wanting to import a database from an internet-based development enviornment into my local xampp installation. When I do this, I get this error:



Database error: Duplicate entry ‘1’ for key ‘PRIMARY’ (1062)

Invalid query: INSERT INTO admin_role (role_id, parent_id, tree_level, sort_order, role_type, user_id, role_name) VALUES (‘1’, ‘0’, ‘1’, ‘1’, ‘G’, ‘0’, ‘Administrators’)



I suppose I could create a new database and import it via PHPAdmin but it seems like there should be a route through the Admin Panel to do this for the “average” user.



I’m also looking for details about the database structure like table names and what data is stored there. Wordpress supplies a very detailed schema of their database structures. Does CS-Cart have this somewhere, kept current?

Marj,



I move my sites back and forth between XAMPP and my live server all the time. I actually just got done uploading a site not more than 2 minutes ago.



Going either direction is the same process for me.



This is what I do.



1.) Compress my files

2.) Use phpMyAdmin and export my database I want to transfer

2.) Download or upload them depending on where I’m going

3.) Unpack the files

4.) Use phpMyAdmin and import my database

5.) Change my config.local.php file to match my settings

6.) Change my .htaccess to match my settings



That’s it.



As for the admin database stuff, in my opinion it sucks and is a waste of time. Some people are fine with it, but I feel it causes more trouble than it is worth. I’ve personally had some issues with it and so now I just use phpMyAdmin. There might be a better way, but this works for me.



As for documentation, there really isn’t anything. Most tables are pretty self explanitory, but you can always ask here on the forum if you are looking for something particular.



I hope this helps,



Brandon

[quote name=‘MarjWyatt’]For the time being, I am wanting to import a database from an internet-based development enviornment into my local xampp installation. When I do this, I get this error:



Database error: Duplicate entry ‘1’ for key ‘PRIMARY’ (1062)

Invalid query: INSERT INTO admin_role (role_id, parent_id, tree_level, sort_order, role_type, user_id, role_name) VALUES (‘1’, ‘0’, ‘1’, ‘1’, ‘G’, ‘0’, ‘Administrators’)



I suppose I could create a new database and import it via PHPAdmin but it seems like there should be a route through the Admin Panel to do this for the “average” user.



I’m also looking for details about the database structure like table names and what data is stored there. Wordpress supplies a very detailed schema of their database structures. Does CS-Cart have this somewhere, kept current?[/quote]



Find this table: admin_role

Browse the rows

Delete entry “1”



Attempt to reimport.



It would appear that you are attempting to import portions/all the database but the row 1 already exists, hence the “stop”

Well, here’s what I did in my development devironment that seems stupid now but, at the time I made the decision, it seemed smart. :smiley:



I have 2 different applications within the same database and I’m really looking for a list of table names so I know which ones to export and import. I just tried selecting all tables with cscart_ prefix and that import was 10 tables short of what is in the other local and functioning database.



If anyone has a list of the CS-Cart data dictionary, that would list all of the table names that are relevant. Another shopping cart that I’ve worked with has an up to date database diagram, which is very nice.



Meanwhile, I will try some of these recommendations that people have posted. Thanks so much for all of your help!