MartyW Posted August 6, 2013 Share Posted August 6, 2013 Hello, I am having a bit of trouble downloading my site to work on it locally. When you download a site using FTP (Filezilla) does filezilla download the database? I have been working on a site locally "presta101" (Thanks Nemo) and I could just copy the CSS files to my remote server but to me its just not good practice I think I should downloading the entire site with the database, working on the locally and then uploading the changes. When I download the site I enter localhost/SITENAME into the browser and nothing happens apart from an error stating no DB connection ive tried change the settings file to get around this. Am I thinking about it in the wrong way as in I should only be editing the theme files locally? Any help on this would be great Marty Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 filezilla doesn't download the database. In this case you have to use some database manager to export the database, then in localhost - to import it. don't forget about change the config / settings file (you have to change database credentials there) database export tutorial + databse import tutorial 1 Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 6, 2013 Share Posted August 6, 2013 download .spl zip file from admin Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 looks interesting jitenx, can you describe whole process + upload this backup? Link to comment Share on other sites More sharing options...
MartyW Posted August 6, 2013 Author Share Posted August 6, 2013 Thanks very much for the help ile look into running databases locally Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2013 Share Posted August 6, 2013 so your problem is solved? Link to comment Share on other sites More sharing options...
MartyW Posted August 6, 2013 Author Share Posted August 6, 2013 (edited) Not just yet I had to go out earlier, im watching a youtube video here I already have xampp installed im just not sure how I run the database and website parrallel locally Edited August 6, 2013 by MartyW (see edit history) Link to comment Share on other sites More sharing options...
MartyW Posted August 6, 2013 Author Share Posted August 6, 2013 Could someone explain to me what file directory I need to download my remote database to in order to run it parallel to my website locally? Should I copy the admin folder from an existing local site over to the remote site download and then import the remote database? Any help on this would be great as Im at a bit of a loss Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 So I downloaded my remote site but when I try to run it locally I get this error "Link to database cannot be established: SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file" Any thoughts? Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 7, 2013 Share Posted August 7, 2013 admin/advance parameter sql backup accept disclaimer download Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 admin/advance parameter sql backup accept disclaimer download and how to import it? MartyW you have to export the database exactly as i show in the urls above. have you got an access to the database manager like phpmyadmin? (on your host) Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 (edited) Hello, Thanks for all the help so far. Using phpMyAdmin I created a blank database that would reflect the name of the remote database that I am trying to copy I then logged into the remote back office made a copy of the live database saved it to my computer and imported into the local blank database using phpMyAdmin. I then went into my newly downloaded local site to here see image 1 Went into the settings.inc.php folder and changed the settings to direct it to the local database see image 2 Edited the settings to what is in image 3 I have tried - define('_DB_SERVER_', 'localhost'); as define('_DB_SERVER_', '127.0.0.1'); Went to my browser and entered localhost/eggs pressed enter and my remote site launches??? I really cant see what I am doing wrong can anyone spot anything that I am missing? I used FTP to download the remote site to the eggs folder Thanks Marty Edited August 7, 2013 by MartyW (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 everything looks well what to do? are you sure that you use correct datbase username and password? it must be related to the username on your localhost mysql user (not remote!) Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 Hi Vekia, yes I am sure as I had a run in with "no privileges" and I had to change them and my username and passwords are the same locally and remotely, Im trying to keep it simple until I get my head round this. I have noticed that my original installation contains an "admin" folder and my ftp remote site does not see images 5 & 6 Will this make a difference? Ile try it anyway Thanks Marty Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 (edited) Hello, When the local XAMPP server is switched off and I enter localhost/eggs my browser throws this error "Link to database cannot be established: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it." The when I switch the local XAMPP server on and enter localhost/eggs it redirects the page to the remote site? I must be missing something in the settings can anyone think of what it might be? Thanks Marty Edited August 7, 2013 by MartyW (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 now you have to change the ps_shop_url table in the database change the fields domain domains ssl base uri values of these field must be related to the "localhost" shop you can also change these values right in BO, preferences > seo & urls Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 Hey Vekia I tried this but now nothing happens I have a few screen shots, it doesnt redirect to the live site the page just stays blank Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 7, 2013 Share Posted August 7, 2013 its not a good idea to do this in prestashop..unless u have uploaded lot of products..delete settings.inc and reinstall prestashop copy install folder from fresh prestashop and run install Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 Hello thanks for the reply but I am confused about what Its not a good idea to do? I don't understand what you are referring to can you explain? Thanks Marty Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 7, 2013 Share Posted August 7, 2013 copy all files from local host to server delete settings.inc and upload a folder name install to root folder from fresh downloaded pS. and run install thats it evry thing will come up like local host Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 Thanks for the reply but im completely new to PrestaShop and im struggling to understand your short hand could you please explain the above in more detail? Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 and what about products etc? Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 7, 2013 Share Posted August 7, 2013 every thing wll come up even products... this is really simple ok. step by step: 1.copy all local host prestashop files and create a folder thats ur site now there in config folder u need to delete setings.inc 2. download a fresh prestshop of ur version and copy the folder name install to root folder of ur site ( the folder u created) 3.upload it to server and run install thats ur site url or directory of ur site thats it. even :u can even do u import by editing sql file cahning shop url and hostname password etc manualy . will take time Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 7, 2013 Share Posted August 7, 2013 this is what leo peoples do wen u download their theme and install every thing gets install even products Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 step by step: 1. Create a root folder 2. Copy the locally hosted prestaShop files to the root folder 3. Delete the config > settings.inc (Entire file or just a few settings)? 4. Download a fresh prestaShop that matches your version 5. Name it after the original "root folder" in step 1 6. Upload it to the server Im still a bit lost but Ile give it a a go can you please clarify if I am deleting the settings file? Or just a few settings within it? Thanks Marty Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 7, 2013 Share Posted August 7, 2013 only settings.inc Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 but for what purposes reinstallation ? if i will reupload database, then installator will not work Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 Could you please explain what settings in the file should be deleted? <?php define('_DB_SERVER_', 'localhost'); define('_DB_NAME_', 'presta101'); define('_DB_USER_', 'root'); define('_DB_PASSWD_', ' * '); define('_DB_PREFIX_', 'ps_'); define('_MYSQL_ENGINE_', 'InnoDB'); define('_PS_CACHING_SYSTEM_', 'CacheMemcache'); define('_PS_CACHE_ENABLED_', '0'); define('_MEDIA_SERVER_1_', ''); define('_MEDIA_SERVER_2_', ''); define('_MEDIA_SERVER_3_', ''); define('_COOKIE_KEY_', 'H4YG7BL0eMVepJgzHCKaa2nwYOpbKG45DGv6qZ8qPEq1nRA7zpH89rUU'); define('_COOKIE_IV_', '2ReniA9T'); define('_PS_CREATION_DATE_', '2013-07-18'); define('_PS_VERSION_', '1.5.4.1'); define('_RIJNDAEL_KEY_', 'yR9prpxw0rxUiCMyNJI5OrH3JR8VpHZU'); define('_RIJNDAEL_IV_', 'QJfC0QwhSkig4GyZg31zLA=='); Thanks Marty Link to comment Share on other sites More sharing options...
MartyW Posted August 7, 2013 Author Share Posted August 7, 2013 Where in the DB is the name stored as a setting? When I change define('_DB_NAME_', 'presta101'); to define('_DB_NAME_', 'eggs'); It crashes, it cannot access the eggs DB, any thoughts? Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 7, 2013 Share Posted August 7, 2013 do watever u like i did amny times moving from loacl host to server..with this process and succeed its ur wish Link to comment Share on other sites More sharing options...
MartyW Posted August 8, 2013 Author Share Posted August 8, 2013 Kept reinstalling until it worked and thankfully it does now after four local installs of PrestaShop and 4 database imports it finally worked thanks for all the help everyone I think the problem was the first few times I copied directly via FTP and there was no admin folder and in turn I could sync with the database Thanks again Link to comment Share on other sites More sharing options...
preserver Posted September 10, 2013 Share Posted September 10, 2013 Marty, I'm trying to get a local version of my remote site up and going for testing purposes before my site is open to the public. I have been watching tutorials and reading posts from various places about this, but I haven't gotten it all to work yet. This thread is promising (you got it to work!), but I had trouble following what Jiten Rash was saying. Do you think you could post what steps you did to get your remote files and databases running locally? The guidance would be very helpful! Thanks, Helen 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