nikmagnus Posted February 13, 2011 Share Posted February 13, 2011 Hi. I'd like to share my experience with transferring a prestashop designed and tested on a localhost (in my case using MAMP, but should be similar with WAMP or others).1. After getting your hosting, use an FTP program (eg dreamweaver or other) to upload the contents of your prestashop folder into the root directory. On the localhost, my files were kept in a folder inside htdocs directory. Perhaps you have a different configuration.2. Export the SQL database using phpmyadmin from the localhost. You can find phpmyadmin from the MAMP or WAMP welcome screen. You would have used this to create your prestashop database when you installed it.The settings I used were:In phpmyadminUnder Export, use select all, and click on SQLAdd DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENTAdd IF NOT EXISTSAdd AUTO_INCREMENT valueEnclose table and field names with backquotescheck these options under the structure.In the field provided, type a filename for your export, click on gzipped option in and click GO at bottom right of screen.It should land in the downloads folder. Go and locate this file.3. On your webhosting control panel, go and find the section where they allow you to create a SQL database.On my hosting it was "Add SQL database" - part of the cPanel.Create the new database and select all privileges.Ensure you select a good database name, with a strong password. You wont be needing to access this often so it doesnt have to be memorable.VERY IMPORTANT: Make sure you write all the settings down! Preferably COPY/PASTE into a dedicated document.Then, choose the phpmyadmin part from the cPanel.Choose the database you just created, and click on the import tab.Locate the file you just exported (above) from your local hard drive.make sure "utf8" is selected.format should be SQL, click "GO"4. On your webserver, navigate to config/settings.inc.php file and edit the settings to line up with the new database details. define('__PS_BASE_URI__', '//'); define('_THEME_NAME_', ''); define('_DB_NAME_', ''); define('_DB_SERVER_', 'localhost'); define('_DB_USER_', ''); define('_DB_PREFIX_', 'ps_'); define('_DB_PASSWD_', ''); define('_DB_TYPE_', 'MySQL'); define('_COOKIE_KEY_', ''); define('_COOKIE_IV_', ''); define('_PS_VERSION_', '1.3.6.0'); The things to change are in between < >.5. You then need to change the .htaccess file in the root folder that was generated on your localhost.The best way is to copy the contents of the file.Then go to your backend (on the web) - you should be able to login my now.Under tools, generators. Generate a new .htaccess.Edit the new(web) one and compare it with the localhost version. Add any additions that the localhost version had. Some modules require you to paste some code into it.You should have your shop up and running after this.Please let me know if I have made any errors / anything to contribute.Note, I have little experience with these things so probably unable to help answer questions, but post them here anyway and hopefully one of the contributors will be able to help out.Cheers, Nik Link to comment Share on other sites More sharing options...
beckizzle Posted February 14, 2011 Share Posted February 14, 2011 Thanks for the indepth tutorial! I've trying to do this all day I've followed your instructions to the tee but im getting this error when i import my DB to my live site through cpanel:SQL query:---- Database: `name`--CREATE DATABASE `name` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;MySQL said: Documentation#1044 - Access denied for user 'name'@'localhost' to database 'name' To me it sounds like i dont have permissions, but im not good at the database side of things therefore im not sure. Anyone have any ideas?Also, Swedish? eh?! hahaThanks for your timeEDIT: Sussed it, make sure you have the same username & password on each database - DERPPPPP Link to comment Share on other sites More sharing options...
Lucas-911 Posted February 23, 2011 Share Posted February 23, 2011 Hey, a bit of topic here but I am trying to install Prestashop on MAMP... I have successfully installed everything and the front end shows up correctly in my browser...The backend is causing me some trouble though. I cannot get past the login screen. When the correct email and password is inputted the screen is just refreshed??? Link to comment Share on other sites More sharing options...
justinl Posted March 8, 2011 Share Posted March 8, 2011 Hello Luke,I'd suggest creating a new thread for your question. It's against forum rules to just randomly post an off topic question like this. It makes things disorganized and difficult to search Link to comment Share on other sites More sharing options...
erikab Posted March 23, 2011 Share Posted March 23, 2011 I am getting the same error message:MySQL said: Documentation #1044 – Access denied for user ‘name’@‘localhost’ to database ‘name’How do I change the username & password on each database?Thanks! Link to comment Share on other sites More sharing options...
justinl Posted March 23, 2011 Share Posted March 23, 2011 @erikabIf you are trying to create a username & password for a database, usually your hosting will have some sort of control panel where you can modify and edit your database along with creating new users for it.Another way that some hostings allow is by using phpmyadmin and selecting the database you wish to use, and then click on the privileges tab and clicking on "Add new user" Link to comment Share on other sites More sharing options...
nikmagnus Posted March 24, 2011 Author Share Posted March 24, 2011 @erikabyou should change the settings in the file config/settings.inc.php with that of the database that you uploaded onto your server. It should be relatively simple.If you cant get it to work, delete the database on the server, create a new one. Be careful to record the name and user and password of the new database, then when you have imported the SQL data into it, you can adjust the config/settings.inc.php contents with the new database details. 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