Jump to content

[SOLVED] Moving / Migrating Prestashop to a new host


Recommended Posts

Can anyone tell me how to migrate my prestashop install to a new web host? I've done a bunch of customizations to the theme and applied a number of bug fixes to the source code (following suggestions in the forum), so I don't want to have to reapply all of these from a fresh install. Is there a simple way to migrate the site to a new server?

I tried this and it didn't work:
-scp the entire directory to the new server
-recreate a new mysql db from a backup of the old one
-point the config file to the new db

I tried running the installer on a clean install and it works ok, but how do I get all my old data connected to it? Also, is it safe to copy over my repaired source files?

If someone can give me step-by-step directions I'd be most grateful. I can't seem to find this anywhere in the documentation.

Thank you!

  • Like 1
Link to comment
Share on other sites

I moved hosted tody using this procedure :
1. copy all files from oldHost to my HardDrive
2. copy all files from HD to newHost
3. create new db on newHost
4. create db user on newHost with all needed rights
5. edit settings.inc in config dir
6. export all mysql data from oldHost in sql format
7. run exported sql code in newHost

Everything seems to work perfectly...

I didn't need to rerun the installer...

  • Like 1
Link to comment
Share on other sites

That's basically the exact same thing I tried the first time. The back office looked mostly right - with the obvious problem that the little colored pictures on the back office home page were not showing up. But the front office did not show up at all. Just a blank white page. Couldn't figure out what was happening.

Anyone else have any suggestions? What exactly does that install script do?

Thanks!

Link to comment
Share on other sites

Oh hooray - that worked! All this time fiddling around, and it was just the directory permissions I had to fix. For the record, here they are (copied from the config dialog):

SYSTEM AND PERMISSIONS
The following settings are required. Please make sure the following checklist items are true.

If you have any questions, please visit our Documentation Wiki and/or Community Forum.
PHP settings (modify via your PHP admin software):
PHP 5.0 or later is installed
Allowed to upload files
Allowed to create new files and folders
GD Library is installed
MySQL support is on
Write permissions on files and folders:
/config
/tools/smarty/compile
/sitemap.xml
Write permissions on folders and subfolders/recursively:
/img
/mails
/modules
/themes/prestashop/lang
/translations
/upload
/download
Optional set-up

PHP settings (modify via your PHP admin software):
Allowed to open external URLs
PHP register global option is off (recommended)
GZIP compression is on (recommended)

Link to comment
Share on other sites

here's how to set permissions from the command line:

chmod 755 .
chmod -R g+rwx img mails modules themes/prestashop/lang translations upload download
chmod g+w config upload download tools/smarty/compile/ sitemap.xml config/settings.inc.php
chmod -R a+rwx img

Link to comment
Share on other sites

  • 1 year later...

I followed this procedure:

1. copy all files from oldHost to my HardDrive
2. copy all files from HD to newHost
3. create new db on newHost
4. create db user on newHost with all needed rights
5. edit settings.inc in config dir
6. export all mysql data from oldHost in sql format
7. run exported sql code in newHost

and also checked the permissions, they are all correct but im still getting a blank white page when I goto the site.

Can anyone give me some advice on how I can fix this problem. My new website host 1&1;and I purchased the bussiness package.

Any help is very much appreciated.

Kind regards
Nick

Link to comment
Share on other sites

I managed to fixed the problem.

I modified my .htaccess file

added to the top of the file

SetEnv DEFAULT_PHP_VERSION 5
AddType x-mapp-php5 .php4
AddHandler x-mapp-php5 .php4
AddType x-mapp-php5 .php

It seems to be working now, if anyone can confirm that this is the correct thing to do, I would really appreciate it.

Thanks
Nick

Link to comment
Share on other sites

  • 7 months later...

I also have a similar problem, I Just wanted to move my database data of my products to my new URL, as my testing server is 1.3.0 and new one is 1.3.3, and I see the same settings like the " More Info " " Comments " are nicely presented in tabs but in the earlier version it is not, Hence Can you any one help me migrate my data.

As I have a lot of attributes values and Features and Download PDF as I don't want to lose anything or redo anything, Can anyone help me in this about step by step method.

Link to comment
Share on other sites

I also have a similar problem, I Just wanted to move my database data of my products to my new URL, as my testing server is 1.3.0 and new one is 1.3.3, and I see the same settings like the “ More Info “ “ Comments “ are nicely presented in tabs but in the earlier version it is not, Hence Can you any one help me migrate my data.

As I have a lot of attributes values and Features and Download PDF as I don’t want to lose anything or redo anything, Can anyone help me in this about step by step method.



http://www.uk-linksjewellery.com/links-of-london-necklaces.html

Link to comment
Share on other sites

  • 3 weeks later...

I have a little problem when importing with phpmyadmin. Are there any settings I need to have?

Fatal error: Maximum execution time of 300 seconds exceeded in /usr/share/phpmyadmin/libraries/import/sql.php on line 69

the file is not that large. 2712KB and packaged in .gz with the settings ticked like it should after the tutorial on how to export

36383_ZURr1G9dBR2ZlRAsMTrZ_t

Link to comment
Share on other sites

There is something else you must do.

Before moving the database, edit the sql file and replace text http://www.myoldhost/ to http://www.mynewhost/

That´s easier than adjusting everything manually afterwards:




http://www.sagie.es
Diseño de páginas web en torrevieja
Website design Torrevieja


Edit the sql file? what program do I need?

Could I somehow split the sql file in smaller parts?.. or extract each table from the file?
Link to comment
Share on other sites

  • 4 months later...

I have just moved my prestashop system to a new server. following these instructions.

All files moved from the site to the new server.

sqldump and imported into new mysql database.

edited settings_inc.php file with the new connection settings to the newly named db



However error messages front and backoffice. any ideas what the problem may be?

I get this message when loading the home page:

assign('HOOK_HOME', Module::hookExec('home')); $smarty->display(_PS_THEME_DIR_.'index.tpl'); include(dirname(__FILE__).'/footer.php'); ?>

and alot of garbage when loading the back office:

sample here

* @copyright PrestaShop * @license http://www.opensource.org/licenses/osl-3.0.php Open-source licence 3.0 * @version 0.8 * */ //ob_start(); define('PS_ADMIN_DIR', getcwd()); include(PS_ADMIN_DIR.'/../config/config.inc.php'); include(PS_ADMIN_DIR.'/functions.php'); include(PS_ADMIN_DIR.'/toolbar.php'); include(PS_ADMIN_DIR.'/header.inc.php'); if ($tab) { if ($id_tab = checkingTab($tab)) { $tabs = array(); recursiveTab($id_tab); $tabs = array_reverse($tabs); echo '
'.translate('Back Office').''; foreach ($tabs AS $key => $item) echo ' >> '.((sizeof($tabs) - 1 > $key) ? '' : '').$item['name'].((sizeof($tabs) - 1 > $key) ? '' : ''); echo '
'; if (Validate::isLoadedObject($adminObj)) if (!$adminObj->checkToken()) return; /* Filter memorization */ if (isset($_POST) AND !empty($_POST) AND isset($adminObj->table)) foreach ($_POST AS $key => $value) if (is_array($adminObj->table)) { foreach ($adminObj->table AS $table) if (strncmp($key, $table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) $cookie->$key = !is_array($value) ? $value : serialize($value); } elseif (strncmp($key, $adminObj->table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) $cookie->$key = !is_array($value) ? $value : serialize($value); if (isset($_GET) AND !empty($_GET) AND isset($adminObj->table)) foreach ($_GET AS $key => $value) if (is_array($adminObj->table)) { foreach ($adminObj->table AS $table) if (strncmp($key, $table.'OrderBy', 7) === 0 OR strncmp($key, $table.'Orderway', 8) === 0) $cookie->$key = $value; } elseif (strncmp($key, $adminObj->table.'OrderBy', 7) === 0 OR strncmp($key, $adminObj->table.'Orderway', 12) === 0) $cookie->$key = $value; $adminObj->displayConf();

Link to comment
Share on other sites

  • 5 weeks later...

to move your prestashop to another hosting or even to a localhost, you have to change on the database, under the table

_configuration



PS_SHOP_DOMAIN
PS_SHOP_DOMAIN_SSL



UPDATE  ``.`_configuration` SET  `value` =  'localhost' WHERE  `mi_configuration`.`id_configuration` =159 LIMIT 1 ;

UPDATE  ``.`_configuration` SET  `value` =  'localhost' WHERE  `mi_configuration`.`id_configuration` =160 LIMIT 1 ;

Link to comment
Share on other sites

  • 3 months later...

And another one who needs a little help.

 

I did all the appropriate steps, but it is partly working. The admin is reachable through the new URL, but when I want to go the shop itself I get redirected to the old URL. I haven't got any idea why. Can't find this behaviour anywhere in the files or DB...

Link to comment
Share on other sites

to move your prestashop to another hosting or even to a localhost, you have to change on the database, under the table

_configuration

PS_SHOP_DOMAIN
PS_SHOP_DOMAIN_SSL

UPDATE  ``.`_configuration` SET  `value` =  'localhost' WHERE  `mi_configuration`.`id_configuration` =159 LIMIT 1 ;
UPDATE  ``.`_configuration` SET  `value` =  'localhost' WHERE  `mi_configuration`.`id_configuration` =160 LIMIT 1 ;

 

If you don't do this, it will go to the old url!

 

or you can change it with phpmyadmin (yourprefix)_configuation

  • Like 1
Link to comment
Share on other sites

 

<?php

 

define('__PS_BASE_URI__', '/');

define('_MEDIA_SERVER_1_', '');

define('_MEDIA_SERVER_2_', '');

define('_MEDIA_SERVER_3_', '');

define('_PS_CACHING_SYSTEM_', 'MCached');

define('_PS_CACHE_ENABLED_', '0');

define('_THEME_NAME_', 'cityappliance');

define('_DB_NAME_', 'fifain_imperial');

define('_MYSQL_ENGINE_', 'MyISAM');

define('_DB_SERVER_', 'localhost');

define('_DB_USER_', 'fifain_imperial');

define('_DB_PREFIX_', 'store_');

define('_DB_PASSWD_', 'pass');

define('_DB_TYPE_', 'MySQL');

define('_COOKIE_KEY_', 'ledkrgoex6fxxcwai1kbdwvceztqf0wfxrpy6tzhoq5cp23jxyflfjvy');

define('_COOKIE_IV_', 'jc9vapov');

define('_RIJNDAEL_KEY_', 'xKq2Hir5XCXyAcSdHaGCqvqva2t2R4ay');

define('_RIJNDAEL_IV_', 'rBDEwzTlmDQETnhjEh7gmw==');

define('_PS_VERSION_', '1.4.4.1');

 

?>

 

 

do i need to edit this line?

 

 

define('_COOKIE_KEY_', 'ledkrgoex6fxxcwai1kbdwvceztqf0wfxrpy6tzhoq5cp23jxyflfjvy');

define('_COOKIE_IV_', 'jc9vapov');

define('_RIJNDAEL_KEY_', 'xKq2Hir5XCXyAcSdHaGCqvqva2t2R4ay');

define('_RIJNDAEL_IV_', 'rBDEwzTlmDQETnhjEh7gmw==');

 

i can still get result like this..

The website encountered an error while retrieving http://imperial.fifainfo17.allcx.com/. It may be down for maintenance or configured incorrectly.

Link to comment
Share on other sites

  • 8 months later...

I followed this procedure:

 

1. copy all files from oldHost to my HardDrive

2. copy all files from HD to newHost

3. create new db on newHost

4. create db user on newHost with all needed rights

5. edit settings.inc in config dir

6. export all mysql data from oldHost in sql format

7. run exported sql code in newHost

 

 

On point 1, by "all the files", you mean all the files only in the folder "www"? I am on ubuntu server

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

  • 5 months later...

 

If you don't do this, it will go to the old url!

 

or you can change it with phpmyadmin (yourprefix)_configuation

 

hello,i am trying to move my site to another project but i cant. i use 1.3 version and i cannot find PS_SHOP_DOMAIN_SSL and PS_SHOP_DOMAIN n my ps_configuration. help me please

Link to comment
Share on other sites

  • 4 months later...

I moved hosted tody using this procedure :

1. copy all files from oldHost to my HardDrive

2. copy all files from HD to newHost

3. create new db on newHost

4. create db user on newHost with all needed rights

5. edit settings.inc in config dir

6. export all mysql data from oldHost in sql format

7. run exported sql code in newHost

 

Everything seems to work perfectly...

 

I didn't need to rerun the installer...

 

I am doing everything the same except edit the setting.inc in the config folder becaue i dont knkow which file name and what has to be edit, can you kindly advise what I should do, meantime the web page cannot open but no error message appeared

Thanks Much

Link to comment
Share on other sites

I am doing everything the same except edit the setting.inc in the config folder becaue i dont knkow which file name and what has to be edit, can you kindly advise what I should do, meantime the web page cannot open but no error message appeared

Thanks Much

 

what prestashop version you use? It's important question in this case because setting file values from 1.4.x and 1.5.x arent similar.

If I will get this information - i will show you what you have to edit

 

regards

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I've moved Prestashop to a new host and upgraded it. It took me only one few hours with Cart2Cart. Read more details about Prestashop migration in order to save your time.

 

It's a fake account, probably for SPAM purposes, Tamara Della - you've got also other accounts: FrankBring, MagneticOne

Please stop doing this.

Link to comment
Share on other sites

It's a fake account, probably for SPAM purposes, Tamara Della - you've got also other accounts: FrankBring, MagneticOne Please stop doing this.

 

Vekia,

we apologize for this post, it was an undeliberate action of our intern, not coordinated with the Team and performed in her free time.

 

We respond in forum threads only when our products are directly concerned, and do that from our official account only.

Such a thing will not happen again.

 

Thank you for your patience and understanding

 

Kind regards,

MagneticOne Team

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

  • 1 month later...

I got 1.5.4, copied all files to new server, chmoded 777, changes settings.inc.php copied and succesfully pasted sql to new server, and I get on both admin and shop:

"HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request."

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

  • 2 months later...

Hi guys. I know this has been resolved, so sorry in advance if I'm not supposed to open it back up...

 

I have tried to follow everything I read in this post but I am still having problems. Here's what I did:

 

Uploaded all shop files on to new host FTP

Made a new MySQL database on new host

Edited settings.inc.php with new database info: changed server name, db name, db user and password

Exported old database's SQL, imported into new database

Opened permissions to shop folder

 

I also made sure that my domain name is listed in the ps_configuration table

 

I am getting this error when I try to access the shop url:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

----

 

And I get this one when I try to access the admin page:

 

Link to database cannot be established: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111

----

 

Any help would really be appreciated. Please keep in mind I am not a web developer and I am learning as I go along. :)

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

  • 4 months later...
  • 10 months later...

I have also follow all steps as above but i get

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at 192.169.235.160 Port 80

Link to comment
Share on other sites

  • 7 months later...
  • 5 months later...

 

I followed this procedure:

 

1. copy all files from oldHost to my HardDrive

2. copy all files from HD to newHost

3. create new db on newHost

4. create db user on newHost with all needed rights

5. edit settings.inc in config dir

6. export all mysql data from oldHost in sql format

 

7. run exported sql code in newHost

 

how do i do this step no 7.

I have imported the sql via phpmy admin on new host.

The import is succes...

but when i run the site it is redirecting me to my old domain name,

 

Basically i installed wampserver and presto on it, want to just go around it on my pc rather than on my real site.

 

Link to comment
Share on other sites

  • 5 months later...
  • 11 months later...

I am trying to move my website from Bluehost VPS to Bluehost Cloud shared.

 

Now 

 

I copied all the files

Moved the database

made the changes in config with new database details

 

 

I am still getting Blank page with 500 server error..

 

The error log says

 

[02-Jul-2017 12:55:16 America/Chicago] PHP Warning: Invalid argument supplied for foreach() in /home1/aancoabo/public_html/erakart/classes/shop/Shop.php on line 330

 

I dont understand what is wrong and how can it be resolved 

 

any help will be highly appreciated

Link to comment
Share on other sites

  • 3 years later...

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...