Jump to content

[solved] Doubts duplicating a prestashop site


Recommended Posts

Hi there,

 

I wan't to clone my prestashop site, I have one installation in one folder of my server then I want to create another database and link the new copied files to it.

 

My inicial idea was: copy the folder of prestashop then dump it to another folder, and then, create a new database to use the option "preferences - database - change database".

 

I have made the copy of the files, but when enter to the copied site it redirects me to old one.

 

My question is, how would you clone a prestashop site?.

 

Thanks in advance :)

Link to comment
Share on other sites

Log in to your control panel, navigate to your database section and to your phpMyAdmin and export a copy of your existing database.

 

Then create a new database in the same way you did for the original prestashop installation. Give it a different db name, username and password to the original one.

 

Go back to phpMyAdin to manage the new database and import the exported file you made from the old database.

 

The edit the settings.inc.php file of your duplicated site and change the database setting to that of your new database.

 

You will be able access your FO and BO using the same credentials at the new location.

Link to comment
Share on other sites

What I've tried:

 

1. Copy old files to new folder

2. Export old db on phpmyadmin

3. Create new empty database with new user

4. Import the old db to the new empty one

5. Configurate the settings.inc.php, specifically:

define('_DB_NAME_'

define('_DB_USER_'

define('_DB_PASSWD_'

define('__PS_BASE_URI__'

Rest I think is the same

 

But still redirect to the old one, then I try another solution, the same as after but replacing all the calls to the old directory on the database to the new one, and neither works...

 

Any idea?,

Thanks in advance!

Link to comment
Share on other sites

Well, I'm pretty sure you have done all the steps correctly. However, there should be no need to replace any 'calls' or anything.

 

Did you have a .htaccess file in the duplication. If so try deleting this. You can generate a new one after you have the installation running again.

Link to comment
Share on other sites

Well I have never done this before and never had a problem.

 

This was pretty much the way to upgrade prestashop, creating a duplicate site in a sub-folder to carry out the upgrade while keeping your existing site live, and then moving from a sub-folder to root once completed.

 

Can you not access your FO or BO at all.

 

How about deleting your cookies in your browser, or try a different browser.

Link to comment
Share on other sites

Ok here's the new try:

 

1. Copy old files to new folder

2. Export old db on phpmyadmin

3. Create new empty database with new user

4. Import the old db to the new empty one

5. Configurate the settings.inc.php, specifically:

 

<?php

define('_DB_SERVER_', 'localhost');

define('_DB_TYPE_', 'MySQL');

define('_DB_NAME_', 'newdb');

define('_DB_USER_', 'newuser');

define('_DB_PASSWD_', '*********');

define('_DB_PREFIX_', 'ps_');

define('_MYSQL_ENGINE_', 'InnoDB');

define('__PS_BASE_URI__', '/newfolder/');

define('_PS_CACHING_SYSTEM_', 'MCached');

define('_PS_CACHE_ENABLED_', '0');

define('_MEDIA_SERVER_1_', '');

define('_MEDIA_SERVER_2_', '');

define('_MEDIA_SERVER_3_', '');

define('_THEME_NAME_', 'prestashop');

define('_COOKIE_KEY_', '***********************************');

define('_RIJNDAEL_KEY_', '***************************');

define('_COOKIE_IV_', '*************');

define('_RIJNDAEL_IV_', '************/***********==');

define('_PS_CREATION_DATE_', '2011-10-28');

define('_PS_VERSION_', '1.4.4.1');

?>

 

There's no .htaccess.

 

I can enter to the BO, but when try to enter to the FO only appears blank (no 404 error, so it's something).

 

What's wrong?, any idea?. :wacko:

Thanks,

Antonio Castro

Link to comment
Share on other sites

×
×
  • Create New...