Jump to content

Upgrading prestashop and moving hosting


Recommended Posts

Hi,

 

I have an online shop which runs over an obsolete prestashop 1.4.7. I want now to upgrade the prestashop version to the latest (1.6).

 

Since the jump is pretty dangerous (almost impossible, probably) and I cannot waste to much time keeping my shop offline, I'm taking into consideration the possibility to move my old shop to another host.

 

Now the possibilities are 2:

       1. Uploading the old version to the new hosting and then try to upgrade

       2. Install v1.6 on new hosting and then try to get old data from the old version (I have around 600 products in 3 languages)

 

Which is the most feasible?

 

I'm already giving some tries...

 

For the possibility 1 I followed these steps:

  • - total backup of old version
  • - upload to the new hosting
  • - change settings.inc.php of db name, db user, psw etc etc

 

Result: Not working. I'm getting a blank page in front end, while BO seems working, instead. I turned "display_errors" but the front end remains still blank.

 

@ini_set('display_errors', 'on');

 

 

For the possibility 2, the problem is that I tried to upload the sql file but all crashes after that. I've tried from phpMyAdmin (but my file is too big and alternatives I found do not work). I get the same result also by uploading the the db file from the cPanel.

 

Maybe I am missing some other possibilities or I'm doing the listed ones wrong, but the last chance is to install 1.6 and upload products and everything manually  :unsure:

 

Hope, I'm wrong!

Link to comment
Share on other sites

Hi

 

I would recommend best option to be download an intermediate version of prestashop - say 1.5.4 and then in 1-click auto upgrade change upgrade location to local directory and upgrade to that version of prestashop and then from there to 1.6.0.5 (obviously you could do a few more 'jumps' if you wanted 1.5.2-1.5.4-1.5.6 etc)

 

White screen on front office is usually but not always database connection issue - you say you have edited settings.inc.php to change db_name, db_user, etc but not that you have then updated database permissions - grant ALL on db_name.* to db_user@localhost identified by'password' (this is for mysql) and can be done through cpanel or phpmyadmin or in mysql from a terminal window.  (alternatively see below re file permissions)

 

For phpmyadmin and database being too big - my database has some 12000+ products and works fine so is probably the php.ini settings are set quite restrictive - can you ask your host to increase them (specifically max_upload_time, max_upload_size, post_max_size - there may be others depending on your error message)

 

Do you have access to a terminal window?  Importing database direct into mysql always works better for large files.

 

Re moving site - you do not mention whether you use linux or windows - I know on linux if you do a simple cut/copy and paste to move your site it changes the file permissions which can cause problems with running a shop, on linux you are better off 'compressing' the directory of your shop then cutting/copying and pasting it then unzipping it this doesn't occur.

 

Good luck

Link to comment
Share on other sites

Thanks for answering... 

Hi

 

I would recommend best option to be download an intermediate version of prestashop - say 1.5.4 and then in 1-click auto upgrade change upgrade location to local directory and upgrade to that version of prestashop and then from there to 1.6.0.5 (obviously you could do a few more 'jumps' if you wanted 1.5.2-1.5.4-1.5.6 etc)

Yes, it could be a good idea.. the fact is that I do not a stable version of 1.4.7  :unsure:

White screen on front office is usually but not always database connection issue - you say you have edited settings.inc.php to change db_name, db_user, etc but not that you have then updated database permissions - grant ALL on db_name.* to db_user@localhost identified by'password' (this is for mysql) and can be done through cpanel or phpmyadmin or in mysql from a terminal window.  (alternatively see below re file permissions)

Frankly, I did not understand this part...

 

 

For phpmyadmin and database being too big - my database has some 12000+ products and works fine so is probably the php.ini settings are set quite restrictive - can you ask your host to increase them (specifically max_upload_time, max_upload_size, post_max_size - there may be others depending on your error message)

 

Do you have access to a terminal window?  Importing database direct into mysql always works better for large files.

My provider said me that the max upload size is 8M (my zipped version of sql file is 15.6M) and there is no way to increase it since I am on a shared hosting.

I use Mac and, after the the Maverick update, the terminal is not working well with ssh connection...

 

Yeah... it is not a good period this...

 

 

Re moving site - you do not mention whether you use linux or windows - I know on linux if you do a simple cut/copy and paste to move your site it changes the file permissions which can cause problems with running a shop, on linux you are better off 'compressing' the directory of your shop then cutting/copying and pasting it then unzipping it this doesn't occur.

 

Good luck

I am using Linux, unix based server...

I changed the permissions all to 755..

 

Where should I compress the directory, on local?

I explain you how I did:

- I did a full backup from cpanel

- I uploaded the homedir/public_html files directly to the new hosting server via ftp (in binary mode)...

Result: BO working, FO not...

Edited by seowebmaster (see edit history)
Link to comment
Share on other sites

I do not a stable version of 1.4.7 - upgrading to a newer version should sort that out - maybe upgrade to 1.4.9 first

--------------------

Frankly, I did not understand this part. - you said you changed the db name etc in settings.inc.php.....you now need to tell mysql what those settings are - in phpmyadmin go to sql window and type    

 

    grant all on db_name.* to db_user@localhost identified by 'password' - then OK it

 

replacing db_name, db_user and password with the name you put in settings.inc.php

It's also important that you do use the ' around the password

--------------------

My provider said me that the max upload size is 8M (my zipped version of sql file is 15.6M) and there is no way to increase it since I am on a shared hosting. - If you cannot import this using a terminal window there is no easy way around this other than opening it in a text editor and saving it as smaller files then uploading the smaller files into the database.

 

if you can import in a terminal window change to directory where database.sql.gz is and then run this command

gunzip < database.sql.gz | mysql -u user -p database

Good luck

Link to comment
Share on other sites

I do not a stable version of 1.4.7 - upgrading to a newer version should sort that out - maybe upgrade to 1.4.9 first

--------------------

Frankly, I did not understand this part. - you said you changed the db name etc in settings.inc.php.....you now need to tell mysql what those settings are - in phpmyadmin go to sql window and type    

 

    grant all on db_name.* to db_user@localhost identified by 'password' - then OK it

 

replacing db_name, db_user and password with the name you put in settings.inc.php

It's also important that you do use the ' around the password

Thanks for the prompt answers... 

 

#1044 - Access denied for user db_user@localhost to database 'db_name'

 

Of course I replaced the data in there...

Link to comment
Share on other sites

#1044 - Access denied for user db_user@localhost to database 'db_name'

 

is just that - access denied for that user on that database using that password 

 

rerun the grant all on command again and make sure exactly matches what is in settings.inc.php and that you surround the password with ' ' at each end

 

e.g. grant all on bobsshop.* to bob@localhost identified by 'bob051263'

 

Plus make sure when you refresh the front office page you use CTRL + F5

Link to comment
Share on other sites

Shouldn't make any difference - but if you want to check just change the db_user in settings.inc.php then grant that new db_user access using the grant all command

 

e.g. grant all on bobsshop.* to fred@localhost identified by 'bob051263'

 

(take a backup of your settings.in.php file first just incase)

Link to comment
Share on other sites

If I change the name of user on the settings.inc.php file, the front end displays:

Link to database cannot be established.

 

I retried the redo the sql request as yesterday and I obtain this, while it is still loading.. forever:

 

Stai probabilmente cercando di caricare sul server un file troppo grande. Fai riferimento alla documentazione documentation se desideri aggirare questo limite.

which means: You are trying to load a too large file to the server. Read the documentation, in order to bypass this limit...

Link to comment
Share on other sites

I am really considering the possibility to install the last version of prestashop and then redoing everything from scratch.

 

Is there a way to make a sql request from the old shop where I can select all customers and move them to the new shop or this is impossible?

 

While for all the other data I have to restructure many things, I'd like that the customers would be already there...

Link to comment
Share on other sites

The grant all permissions is correct  - but will only work AFTER you have imported the database.

 

To IMPORT the database directly through the terminal window will avoid the TOO LARGE message but will take a while - just leave it running

 

-or-

 

To IMPORT the database via phpmyadmin - if your host will not increase php.ini limits your only option is to SPLIT the .sql file into smaller pieces I have in the past used http://www.sqldumpsplitter.com/ very simple program that splits your sql file into manageable chunks.

Link to comment
Share on other sites

IF you decide to start again I would recommend buying the Advanced Export module from prestashop (about 30-35 euros I think) as this will export most of your info from your current shop for very easy import into new shop saving you many hours work.

 

Uses csv import through prestashop but again if you are uploading larger csv files you may have trouble with your host again.

 

Good luck

Link to comment
Share on other sites

IF you decide to start again I would recommend buying the Advanced Export module from prestashop (about 30-35 euros I think) as this will export most of your info from your current shop for very easy import into new shop saving you many hours work.

 

Uses csv import through prestashop but again if you are uploading larger csv files you may have trouble with your host again.

 

Good luck

This could be interesting...

Do you think it would be possibile to export customers?

What about splitting the the amount of products? Would it create any conflict like deleting the existing and uploading the new ones?

 

Because the module for 1.5+ has a demo version and there is no customer field. There is also v1.4 but there's no demo BO for that...

Edited by seowebmaster (see edit history)
Link to comment
Share on other sites

You can export order and product info currently - however when I bought the module I emailed them and asked for extra functions for exporting and some they did within 24-48 hours and a couple of others they took a little longer on - so no harm in asking.

 

No if used properly it causes no problems with deleting/creating existing products.

 

It generates a txt file so you can easily split it into more manageable amounts.

 

Only problem I can foresee on a complete restart is images.

 

Read up about importing using CSV files.

 

Did you manage to import your database?

Link to comment
Share on other sites

There is an option in prestashop > Advanced Parameters > SQL Manager but sadly I am not an expert in db commands either (hence why I bought module :) )

 

I would still recommend you have a go at importing the database and upgrading it that way even if it is only to learn some basic sql commands.

 

I still do not understand why your host cannot/will not change php.ini to allow people to upload larger files - this would solve a lot of your problems - you could always move host.......

 

Good luck either way

 

PM me if you need any other advise

Link to comment
Share on other sites

I managed to import the customers from the other version (through sql queries in phpMyAdmin), but the passwords has been changed. Probably it happens something with the hashed password and I cannot import the secure key since there is no attribute called like that.

 

Any solution?

 

 

Edit: I have the exact hashed password, but it is not working

Edited by seowebmaster (see edit history)
Link to comment
Share on other sites

Hi,

 

sorry I don't know about regenerating customer passwords (admin I can do though) - my advice would be to search on forums here for help......or a cheats way would be a newsletter to customers along lines of - we moving to new host, updating shop, look at our new shop/products etc please log in to reset your passwords.....

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...