xfdisco Posted May 13, 2015 Share Posted May 13, 2015 Hello, We have a paid hosted webserver in a pretty small setup, therefore we can't import thousands of products using the CSV-Import because we always run into a timeout, this timeout is set and limited in our contract, so there is no way changing it without paying more money, what is no option. But since there is an easy way to set up a local installation of Prestashop we did that, using easyphp. Importing all our Products via a CSV on the local installation did run quite well and we dodged the timeout problem. But now we need to get the database tables from our local installation onto our webserver installation via MySQL Export/Import. Exporting/Importing all tables did work but now if we try to reach our webserver installation we get redirected to the url of the local installation (127.0.0.1...). We already found out that there are tables containing this specific adress and tried to change them but so far it just stopped the redirecting and gave us a permission denied. Does someone know if its easier to export/import only specific tables or to export and import all tables and manipulate them in between both installations ? And is there a list of tables, which need to be manipulated in order to keep the webserverinstallation accessable on the same url it had before ? (or which need to be not exported/imported) Thanks in advance. Link to comment Share on other sites More sharing options...
selectshop.at Posted May 13, 2015 Share Posted May 13, 2015 (edited) Don't manipulate database if you don't have profund knowledge of Prestashop,. Prestashop wirtes several dependencies. It is not possible to name all dependencies. the best is to import the whole database. When Prestashop is installed it writes security cookies/token in double,. For to have a database working you should import the one which is complete with phpMyadmin into a empty database and change the cookies from your install to the cookies of the imported database. For this go to /config/settings/inc.php and copy the two cookie lines (and Rijndael) of the install which database is complete define('_COOKIE_KEY_', '.............'); define('_RIJNDAEL_KEY_', '.......'); define('_COOKIE_IV_', '.........'); define('_RIJNDAEL_IV_', '.........'); By commenting these lines with # for the install with incomplete database. Take care to add a EMPTY database and import the complete database into this empty one. If you import the incomplete database you will override ALL data !!! In this case you need also to change the 4 lines to have database working. By importing to a new empty database you should also change the login-data on the settings.inc.php. In case it does not work, you will have at least the old database working! Therefore it is better you install on an empty one. This work is case sensitive. One error and your shop is gone!!! Please make always back-up of your database before !!! Edited May 13, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
xfdisco Posted May 13, 2015 Author Share Posted May 13, 2015 Thanks for the feedback! Can we do it like this? We empty the database tables of the online installation. We replace the 4 lines in /config/settings/inc.php with the lines of our local installation We import the local database Which changes have to be made thinking about webserver addresses and settings? Our goal is to import the local database with a cronjob daily. The background is that we have to import data from our antique ERP with current prices and all spare part articles. They change very fast. Link to comment Share on other sites More sharing options...
selectshop.at Posted May 13, 2015 Share Posted May 13, 2015 For 1. if you do by this way you will loose this database. But yes you can do it For 2. keep the lines for further needs (if database load via phpmyAdmin not works) and do it as I told before (by adding them to actual project) For 3. exact what I told you. Independent of new empty database, or database emptied For 4 What do you mean ? If you migrate only the database by loading it with phpmyAdmin there is no setting need. Link to comment Share on other sites More sharing options...
xfdisco Posted May 13, 2015 Author Share Posted May 13, 2015 Topic 4 We figured out that the database has entries about the webserver. Example dbshop_url And we are not sure if there are other entries which are important for the webserver configuration. What we want to try today is to reconfigure our local webserver so that the webserver configurations in the database are the same like in the live system on the hosted webserver. What do you think? Are we going the right way? Can you tell us which tables are also important or is there a list somewhere? The other topics are clear I think, aren't they? We want to test like this. Link to comment Share on other sites More sharing options...
selectshop.at Posted May 13, 2015 Share Posted May 13, 2015 No I cannot tell you, there are several and also in dependence of the configuration you are using on your shop (multishop or not, extended stock or not, etc. etc, etc). The best way is to move/load the complete database. Link to comment Share on other sites More sharing options...
xfdisco Posted May 13, 2015 Author Share Posted May 13, 2015 We did some experiments the last hour. It seems to work. We will send better feedback later. Thank you! Link to comment Share on other sites More sharing options...
selectshop.at Posted May 13, 2015 Share Posted May 13, 2015 You are welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now