Jump to content

How to copy your prod site to a test site


Recommended Posts

I've just gone through updating my test site to be a copy of my prod site.  Here are the full instructions in case it's of use to you.  For the sake of the example, www.prod.com is the production site and www.test.com is where I have my test site.

 

Using your FTP client, copy all files from public_html to your hard drive for both prod.com and test.com (separate directories!)

Log in to prestashop admin and run db backup for prod.com and test.com and save file to hard drive

Log into test.com cPanel and go into phpMyAdmin

Select your test.com database and click on 'Import'

Select your prod.com file (either unzip first to a directory or change ending to .zip) and import

Now go back to your FTP client and copy all the files from prod.com to test.com directories

 

Update /config/settings.inc.php on test.com to have the right database name, etc, plus Prestashop version (you have the old and new versions on your hard drive) or if the test Prestashop is the same as prod, just copy back your original test.com file

Keep .htaccess for the rewrite rules (or copy your old one back if you wiped it out)

Change robots.txt to prevent crawling of the test.com site

 

Using phpMyAdmin:

Change all prod.com to test.com in ps_configuration along with ps_shop_name

Change all prod.com to test.com in ps_shop_url

Change all prod.com to test.com in ps_blockfooter link boxes for CMS links used (or any other customised modules where you have the prod.com) url.  This is important because you can be using your test site, click on a CMS page like 'Delivery information' and suddenly you will be on your prod site and you might not notice. (Another option is to set a global CSS rule to make the background of your test site a different colour.)

 

Next log-on to the BO.

Reset password if needed (just use 'lost password?' link on admin login and then remember to update employee with the ongoing password!!

 

Change 'index' to reference test.com on SEO & URL page

Disable Google Analytics module to prevent false hits

Change PayPal (or other payment) module to have test API credentials

Change shop name in Store Contacts to be the test store

Rebuild search index in Search

 

 

That should do the trick--a fully working mirror of your prod site.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Hi Jesper,

 

I wrote the instructions for copying to an external domain rather than localhost.  I would imagine you just change all references to www.test.com to be 127.0.0.1 or whatever your local host is.  Even easier, I would just follow the Prestashop upgrade documentation which provides the steps -> http://doc.prestashop.com/display/PS15/Manual+update.

 

I hope this helps you,

 

Piers.

Link to comment
Share on other sites

  • 1 year 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...