Jump to content

Restoring Prestashop on Local Host


Gray R

Recommended Posts

I have been configuring & testing Prestashop 8.1.1 on Mint Linux PC. I have bought a theme and a number of additional modules. I have this running but wanted to set up this system on a second desktop. I backed up the database and copied the Prestashop folder & database to a flash drive. I did a fresh install of Prestashop on the second machine.

On this machine I dropped the freshly installed database , created new blank Prestashop database and imported the database I had backed up on the first machine.

I deleted the Prestashop folder and replaced it with the folder from the first machine.

I checked the Admin folder credentials (admin136q0rohy3coetsymt9) and pasted that in the login screen (http://127.0.0.1/prestashop/admin136q0rohy3coetsymt9) . It would normally generate something like this

http://127.0.0.1/prestashop/admin136q0rohy3coetsymt9/index.php?controller=AdminLogin&token=4d0c7d712687d616120eaf1aed3a722f

This is displayed but I get "Server returned a "500 internal server error"

I can't find any pointers. Hope someone can point me in the right direction

 

 

Link to comment
Share on other sites

Hi Ambassador - When I look at  config/defines.inc.php this is the only code

/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', false);

I have just reloaded the Prestashop 8.1.1. standard install on 2 separate desktops. I made 1 change on the one machine - uploaded a new theme and made that the theme to be used. l made a backup of the Database and the Prestashop. I then imported the DB backup on a second machine through PHPMyAdmin. I then copied my Prestashop folder onto the second machine. I changed config/defines.inc.php define('_PS_MODE_DEV_', false) to define('_PS_MODE_DEV_', true);

I had an error when trying to activate Prestashop as per PDF TRUE. I then changed the true to false a and had the error as per PDF False

This is what I entered to start prestashop http://127.0.0.1/prestashop/admin319ykmvaqpzd59npesr (this was the name of the Prestashop Admin Folder)

Obviously I am doing something wrong. Hope you can point me in the right direction

Thanks

Gray

Prestashop Load error FALSE.pdf Prestashop Load error TRUE.pdf

Link to comment
Share on other sites

Hi I tried the following senarios with no luck

From machine 1 with customised theme - set config/defines.inc to true & cleared the cache directory in prestashop/var/cache. This did not work

The only restore that I have managed to work is if I backup the system. I then re install Prestashop. I can then drop the newly installed Prestashop and restore the previous backup.This works on 1 machine but not when you backup and try to restore on a second machine

Thanks for the suggetsions, but I will keep trying as I need to upload this to a service provider.

Link to comment
Share on other sites

If your goal is having a backup (second site) of your first install (production site) for development or testing proposes. Something you want play with and not damage your first install (production site), then it's quite easy.

1. install phpmyadmin on both machines.
2.backup your db with phpmyadmin (or command line) on first machine.
3.backup your prestashop installation on first machine.

4.restore your db on second machine with phpmyadmin (or command line)
5.restore your prestashop installation on second machine
6.access your db on second machine, edit ps_configuration :   PS_SSL_ENABLE     0  "<-- 1 ( 0=off 1=on)"
7.access your db on second machine, edit ps_shop_url :
  domain :   www.domain.com   <> localhost
  domain :   www.domain.com   <> localhost
  physical_uri:    /xxxx/ "<-- if not rooted"

8.login to your prestashop Back Office aka admin page
9.go to Advanced Parameters / Performance and hit Clear Cache (you can manually wipe ~/var/cache/dev and ~/var/cache/prod if you prefer)
10.go to Shop Parameters /
Traffic & SEO / Set up URLs > enable Friendly URL and hit Save this will regenerate .htaccess file on your second machine.

hope this helps mirroring/backing up/duplicating your first install on another machine.

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

I did this in the past moving instances of PrestaShop from a local machine to a web hosting account or another machine, instead of doing a fresh install of PrestaShop on a second machine, simply I copied the folder and database on a second machine, then changed the domain links in the configuration and clear cache from back-office or var cache folder. PrestaShop files and database is lightweight and not in big size. It is easy to configure as well.

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