Jump to content

Installing Prestashop and using an existing database


Recommended Posts

I created a backup shop so that I could tinker with things on there, and then make changes onto the live shop. I put all of the items in the database (which took a fair bit of time). Now it works and everything seems fine I would like to sort out my main shop.

 

At the install I cannot use an existing database. It says it already exists and won't carry on the installer. If I install using another database and then go into the admin and change the database to the one I want to use I am kicked out the shop and cannot login again and the shop basically collapses and doesn't work.

 

I've gone into php my admin and exported the backup shop database and tried to import it onto the one for the live shop. That doesn't work either.

 

I'm stuck as to what to do now. I don't want to have to use the backup shop as the main shop as I do want a back up shop, plus the folders I put it in aren't tidy. It's in backupshop/prestashop and I want my live shop to be in /shop.

 

Does anyone have any ideas on how I can export from the backup shop to the live shop, or get the live shop to use the backup shop database?

Link to comment
Share on other sites

If you are wanting to update your live shop then you should load the db from the test shop via phpmyadmin, you should first export your mysql db using the same. If you changed the prefix you will need to change define('_DB_PREFIX_', 'yourprefixhere_'); in your config/settings.inc.php. Here are insructions for moving an entire built site to another. You will need to check each of these for your situation:

 

How I moved an installed prestaship from localhost to a remote server. PrestaShop 1.4.5.1 running on local and remote host, apche 2, php 5.3.8. These instructions are for a subdomain. Just remove the subdomain from the instructions and it will work fine for domains.

 

see this: http://www.addons-mo...ps_shop_domain/

 

Changed the following fields in the new remote mysql db table yourprefix_configuration:

PS_SHOP_DOMAIN alpha.mywebsite.com.co

PS_SHOP_DOMAIN_SSL alpha.mywebsite.com.co

  • Uploaded site files to subdomain/domain root
  • Exported shop localhost database, created remote server database and imported the localhost sql
  • Updated the settings.inc.php as follows

· From: (running localhost)

 

· define('_DB_SERVER_', 'localhost');

· define('_DB_TYPE_', 'MySQL');

· define('_DB_NAME_', 'prestashop141alpha');

· define('_DB_USER_', 'root');

· define('_DB_PASSWD_', ‘mypassword’);

· define('_DB_PREFIX_', 'alpha_');

· define('_MYSQL_ENGINE_', 'InnoDB');

· define('__PS_BASE_URI__', '/prestashop141alpha/');

To: (running remote) subdomain alpha.mydomain.com.co

· define('_DB_SERVER_', 'localhost');

· define('_DB_TYPE_', 'MySQL');

· define('_DB_NAME_', 'alpha');

· define('_DB_USER_', 'alpha');

· define('_DB_PASSWD_', ‘mypassword’);

· define('_DB_PREFIX_', 'alpha_');

· define('_MYSQL_ENGINE_', 'InnoDB');

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

 

Resulted in:

Back Office – will not accept my password. Reset the pwd : See http://nickbartlett....-in-prestashop/

 

This site is working both on the back and front sides.

 

NOTE(s)

MAKE SURE TO CLEAR YOUR BROWSER COOKIES WHEN TESTING!

I already have prestashop sites on my remote server so I know that the necessary modules are loaded.

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