tallinn Posted August 2, 2016 Share Posted August 2, 2016 Hi. There is a PrestaShop hosted by a hosting company which I am to develop for. I am pretty new to PrestaShop and was wondering how I could create a development environment on my own laptop so I can develop new features locally and then deploy them to the server? Regards Link to comment Share on other sites More sharing options...
rocky Posted August 2, 2016 Share Posted August 2, 2016 You can use XAMPP, WAMP or MAMP depending on your operating system to test PrestaShop on your own laptop and then upload your modules and overrides after you've finished testing them. Link to comment Share on other sites More sharing options...
tallinn Posted August 3, 2016 Author Share Posted August 3, 2016 Yes. That I get. And I have XAMPP on my machine. Maybe I am not phrasing the question correctly. I am following this guide: http://doc.prestashop.com/display/PS16/Setting+Up+Your+Local+Development+Environment It tells me to download the PrestaShop from a link. As I understand it, that is a default barebones PrestaShop intended for people who are starting from scratch. I, on the other hand, am not starting from scratch. I am starting with an already developed PrestaShop by someone else. Now I have gotten access to the server where it is hosted and have downloaded the files to my computer. So what I need to know is how to start developing for that PrestaShop instead of creating a new from scratch. A side question. How large is a typical PrestaShop in bytes? The one I have is suspiciously large. Link to comment Share on other sites More sharing options...
rocky Posted August 4, 2016 Share Posted August 4, 2016 I suggest that you go to your cPanel File Manager, select all the PrestaShop files and then click the "Compress" button to create a ZIP of all your files. Download this file and then extract it to a subdirectory (such as C:\xampp\htdocs\prestashop if you're using XAMPP). You should then go to your cPanel phpMyAdmin and then click the Export tab. Select all the PrestaShop tables and then export them as a ZIP. Go to http://localhost/phpmyadmin and then click the Import tab and then select your database ZIP to import the PrestaShop database tables. If done correctly, you'll have an exact copy of your PrestaShop installation on your localhost. It's hard to say exactly how big PrestaShop should be. PrestaShop's Smarty cache and CCC cache can become quite large and so can the /img directory if it has many product images. Link to comment Share on other sites More sharing options...
prestaKing.eu Posted August 4, 2016 Share Posted August 4, 2016 Hi Tallinn, Depending on your current level of skills (command line, VM, networking, apache, .. ), I strongly suggest having a look at Vagrant. Always try to develop on a server corresponding as much as possible to the production environment. MAMP/XAMP/WAMP is really not the way to go. Link to comment Share on other sites More sharing options...
tallinn Posted August 8, 2016 Author Share Posted August 8, 2016 (edited) rocky, I appreciate your help but could you be a bit more verbal in descriping the different steps? What is the cPanel File Manager?I have downloaded all the PrestaShop files through SFTP and I currently have them uncompressed in my "c:\xampp\htdocs\<nameofwebsite>\<nameofwebsite2>" folder. I have also installed the PrestaShop module for Xampp using Bitnami. When I navigate to "http://10.0.0.9/prestashop/" it displays the default PrestaShop website. I am not sure how I can load up my website there. I am guessing I also need to replicate the database somehow. prestaKing.eu, Thanks for the tip. Once I get Xampp running I will take a look at that. Currently, I just want the bare minimum to work. That being the current version of the website to run on my machine.Thanks! Edited August 8, 2016 by tallinn (see edit history) Link to comment Share on other sites More sharing options...
tallinn Posted August 8, 2016 Author Share Posted August 8, 2016 I suggest that you go to your cPanel File Manager, ... Is cPanel something that most hosting companies use on their servers? I am just wondering why you assumed I had cPanel. Link to comment Share on other sites More sharing options...
rocky Posted August 9, 2016 Share Posted August 9, 2016 If you're using XAMPP, there's no need to use cPanel File Manager. You can simply extract the files to C:\xampp\htdocs\prestashop and then go to http://localhost/prestashop in your browser and it should work. Link to comment Share on other sites More sharing options...
tallinn Posted August 9, 2016 Author Share Posted August 9, 2016 Yes. Now we are getting somewhere.So basically what I have done is: 1. Install XAMPP and run Apache as well as MySQL. 2. Download all the files and folders from my hosting provider onto my computer. 3. Created a backup of the database from the manager console and downloaded that backup. 4. Imported the database into my local MySQL database naming the database X. 5. Moved all of the files and folders from step 2. to "C:\xampp\htdocs\projects\prestatest\X\Y" Now if I navigate to "localhost/projects/prestatest/X/Y" then I get this error message "Link to database cannot be established: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known."Which suggests that it can not establish a connection to the database. Are there any config files for each PrestaShop that have basic configuration? When installing a new PrestaShop the installation procedure takes care of setting these for us during installation but I would like to manually change it. Progress Link to comment Share on other sites More sharing options...
tallinn Posted August 9, 2016 Author Share Posted August 9, 2016 I found the "settings.inc.php" file in the config folder. It had the name of the database, name of the server, username, and password. They were all different of course so I changed them to what I have on my local machine. I realize that this will have to be changed back to what it was if I upload it to the production environment. But I will not do that yet. My goal here is to get it working and then make a new one where I have all the steps required and then it will be close to the production environment. 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