Jump to content

How do I run a dev and live copy?


jeremisiron
 Share

Recommended Posts

I need help setting up a Dev version of the cart and Live version, pointing to two databases. How do I set that up?

With this setup on my normal PHP website, when I want to customize my code I do it on the dev version, test it there, then run rsync to push those files to the Live site. Then I just keep a separate config file on the live site pointing to the live database.

How would I do the same thing with my Prestashop installation? Are there only one or two files to maintain separately, like a config file and .htaccess? Are there also values in the database that need to be kept separate? At the start I would duplicate the database and code, but are there other db records that need to be updated?

Thanks for any help you can offer.

Share this post


Link to post
Share on other sites

For DB you mainly need to change entries in ps_shop_url, which stores URL of your shop, as you dev environment will have different URL than production. If you plan to copy from dev to production, then it may be tricky, because of all customers, orders and all data that should not be replaced or overwritten from dev to live.

For files is more simple, you should sync everything except `/app/config/parameters.php`, `/cache` and `/var/cache`. And if you use apache, then please skip `.htaccess` as well. After rsync you should purge those two cache folders to clear cache. You should check permissions to make sure everything working. Also images and module are worth to take a look at, as you may override them.

Additionally, you may want to change DB entries for your payment modules to use sandbox for dev and live mode on production. The same for email smtp configuration.

Hope that will help you.

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More