ristretto6 Posted November 7, 2009 Share Posted November 7, 2009 Hi, there. I'm wanting to upgrade to the new version of Prestashop, but am confused by all the different options out there. I haven't upgraded since I installed the shop in June of '08, but I don't know how to tell what version I am running. I am very nervous about losing all the uploades and modifications I have made to my current shop in the switch (although I am making a backup copy before doing anything) so I want to make sure I'm doing it right!Is there anything I need to know or do differently if I'm upgrading from a very old version? for now I'm reinstalling the newest version and then copying over my theme/img files from my backup. After that I get a little stuck on the directions that are at the top post in this forum...is there an easier wiki that explains how to upgrade?Thanks,-lindsey Link to comment Share on other sites More sharing options...
rocky Posted November 8, 2009 Share Posted November 8, 2009 There are a few ways you can check what version of Prestashop you are using. You can log in to the Back Office and look at the bottom, you can check the CHANGELOG in the root directory to see what version is at the top, or you can open config/settings.inc.php on your remote server at look at the bottom of the file.Upgrading can be tricky. Here are the steps I take when upgading a shop:Before you upgrade your Prestashop, you should back up your files and database in case anything goes wrong, then disable friendly URLs, uninstall all third-party modules and set your theme to the Prestashop theme.Upload all the files from Prestashop v1.2.5 to your server. Do not delete any of your existing files beforehand. As long as config/settings.inc.php remains on your server, the Upgrade option will appear on the installer. Choose it and then proceed with the upgrade. If any SQL errors occur, copy them to a file so you know what needs to be fixed in the database later on. Let us know if there are any problems so we can help fix them.If your using Prestashop v1.1, enable "v1.1 theme compatibility" at the bottom of the Preferences tab, then change the theme to your custom theme. If you are using an older version than v1.1, you'll have to copy the Prestashop v1.2 theme and then modify it to look like your old theme.If you want to use friendly URLs, put a blank .htaccess file with chmod 777 permissions in the root directory, then go to Tools > Generators and click "Generate .htaccess file". You can do the same with a robots.txt file if you want.Enable your third-party module one by one. If an error occurs, uninstall the module and continue with the remaining modules. You will need to check whether Prestashop v1.2 compatible versions of your third-party modules are available, or find alternative modules that do work with Prestashop v1.2.Hopefully, once you've done all this, you should have a working Prestashop v1.2.5 installation with your products and customers intact. Link to comment Share on other sites More sharing options...
21846657 Posted November 8, 2009 Share Posted November 8, 2009 Upload all the files from Prestashop v1.2.5 to your server. Do not delete any of your existing files beforehand. As long as config/settings.inc.php remains on your server, the Upgrade option will appear on the installer. A very very useful tip Rocky. If I understand correctly, the quoted steps will be: a completely files replacing comes first. then choose the option of upgrade from the installer. correct me if I go wrong.In my case, I usually replace the old files with the subversion ones. I guess it could be possible to miss anything by doing this. I just want to make sure what exactly will be, i.e. MySQL changes (since I saw some changes from Subversion). I am a bit confused. Could you put me in the right direction? Link to comment Share on other sites More sharing options...
rocky Posted November 8, 2009 Share Posted November 8, 2009 That's right. I suggested completely uploading Prestashop v1.2.5 because there are many changes between <= v1.1 and v1.2.5. If you are upgrading, for example, v1.2.4 to v1.2.5 or to SVN, it would be easier to do a date comparison on the files and upload only the few files that have been modified. You can then check for changes in the latest file in install/sql/upgrade and execute them on your database. Link to comment Share on other sites More sharing options...
21846657 Posted November 8, 2009 Share Posted November 8, 2009 You can then check for changes in the latest file in install/sql/upgrade and execute them on your database. Aha! Yeah! I think I am likely missing this important step concerning the database. I mainly focused on comparing, merging and modifying the files due to many customizations at my end. So I am going to put my head into the database. Thanks for the suggestion. Cheers! Link to comment Share on other sites More sharing options...
ristretto6 Posted November 8, 2009 Author Share Posted November 8, 2009 Okay, so it turns out I'm using version 0.9.7.2. Would you still recommend installing the new version into the original directory? i was under the impression that I was supposed to create an entirely new directory, and an entirely new database, and then import the relevant files from my old shop into the new one.So far I have backed up all the files/directories from my prestashop server, and have backed up the .sql file of my database. Now you're saying the next step should be to install the newest version into my CURRENT directory, and then the option to upgrade rather than fresh install should be enabled?If I do this and something goes wrong, can I just overwrite that entire directory, and the database file, with my backups and it will be back to normal?Thanks!-lindsey Link to comment Share on other sites More sharing options...
rocky Posted November 9, 2009 Share Posted November 9, 2009 Yes, you need to copy them into your current directory instead of overwriting so that config/settings.inc.php from your v0.9.7.2 installation exists for the upgrade option to appear. You also need to leave the img directory there so that all your existing product images are there after the upgrade.If you've made a complete backup of your files and database, you can restore them if something goes wrong and the old installation should work. Link to comment Share on other sites More sharing options...
ristretto6 Posted November 11, 2009 Author Share Posted November 11, 2009 When I set the installer in my current root directory, I do see the upgrade option, but it keeps freezing at the step of validating system requirements.Instead, I tried installing it in a brand new directory, hoping to transfer my product files over to the new version, and then once I've confirmed that it works and is running, change the directory back to the original name (i.e. the version that is working now but in a much older mode). Will that work? I'm having trouble importing my old database into the new one (when I try to import the SQL file I get an error message that looks like this:Fatal error: Allowed memory size of 83886080 bytes exhausted (tried to allocate 315011 bytes) in /var/admin/mysql5/libraries/sqlparser.lib.php on line 342What files will I need to import in so that I don't have to re-enter all the information for all my products?At the very least, I'd like to start from scratch on this new version, entering all the information manually, but not have the site be "live," i.e. not have it in the directory that i currently advertise my online shop to be housed at. Then, once I have the new site up and running, I'd theoretically transfer all that information to my working directory and overwrite the old one with it. Will this work, or will I lose all my data by transferring the directories?Thanks so much for your help! Link to comment Share on other sites More sharing options...
rocky Posted November 12, 2009 Share Posted November 12, 2009 Have you already done the clean install and are just trying to use your SQL backup to restore your products? You may need to cut your SQL file into appropriate pieces and import them. If you PM me your details and what you are trying to do, I can do it for you, if that would be easier for you. Link to comment Share on other sites More sharing options...
devtrend Posted December 3, 2009 Share Posted December 3, 2009 I have a similar problem. I have been trying to replicate my prestashop from my webhost to my localhost.My localhost is a ubuntu lampserver running under vmware. I had to install a clean version of prestashop to get the appropriate settings.inc.php.However, when I tried to import the database that I had downloaded from my webhost I got the following error:"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 71 bytes) in/usr/share/phpmyadmin/libraries/sqlparser.lib.php on line 66).Please note the following: I copied the php.ini file from my webhost and it has the entry"memory_limit = 32M"Also there are relatively very very few entries in the database (we're still under construction):(www.jewelryfaireusa.com).Thanks to anyone who can shed some light on this. Link to comment Share on other sites More sharing options...
devtrend Posted December 3, 2009 Share Posted December 3, 2009 Hello,While I was awaiting a response (which hasn't come so far), I was able to isolate the fault myself.Although my sql file (about (300K) was below the phymyadmin upload limit of 2MB I first tried splitting the sql file into smaller pieces (eg 50K). This did not change the error.I then tried bumping the memory limit in my php.ini files.(Using the unix "locate" command I found one under /etc/php5/apache2 and the other which I had copied from my webhost, under /var/www). I modified those limits from 32 to 64 then 128 MB. Ultimately I edited the actual sqlparser.lib.php itself and added "ini_set('memory_limit', '128M');" inside the code. This solved the problem for me.I bumped into a separate problem where mysql complained of replicated entries. At that point I simply deleted the database (from within phpmyadmin) recreated a new (blank) one with the same name, re-imported the copy from my webhost, and voila it was done.It has been somewhat of an odyssey for me to try to replicate my prestahop from my webhost to my localhost. The key points for me to achieve success were:1. create a mysql database with the same name and passwd as the one on the webhost2. do a fresh installation of prestashop in the local environment3. copy config/settings.inc.php to a safe spot4. over-write the fresh installation with your downloaded copy from the webhost5. Overwrite the settings config/settings.inc.php fwith the copy from the fresh install6. use phpmyadmin to import the dowloaded copy from the webhost (be mindful of memory_limit problems and replicated entries problems, which I experienced)Hopefullly this should end up with a success local clone.Cheers,Dev. 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