Jump to content

[SOLVED] Make copy of live shop to create replica test environment


Recommended Posts

Hi all,

I'm looking for help with defining all the steps necessary to create a replica of my live site and make a test environment.

This much I know:

1) Create a copy of the DB and give it a new name (i.e. prestashop_dev)
2) Copy all files from live site to the directory of the new website domain (i.e. from www.myshop.com to www.mytestingshop.com)
3) Change the /config/settings.inc.php file to point to the new test DB (The copy from step one)

That's as far as I've thought it through. Can someone please elaborate?

Cory

www.OutdoorStore.ch

Link to comment
Share on other sites

As much as I can imagine, you have covered everything. That is pretty easy, right?
If any of you site (test or service) is not at the root of your domain, you will also need to change following. I guess you also have it in your considerations.

define('__PS_BASE_URI__', '/');

Link to comment
Share on other sites

  • 4 weeks later...
As much as I can imagine, you have covered everything. That is pretty easy, right?
If any of you site (test or service) is not at the root of your domain, you will also need to change following. I guess you also have it in your considerations.

define('__PS_BASE_URI__', '/');


define('__PS_BASE_URI__', '/'); - it is for the root directory? If my shop will be in the directory ''shop'' what I have to write? And Where I have to write down this code? Thanks for your reply!
Link to comment
Share on other sites

Thanks for your reply and help!

And..

Hi all,

I'm looking for help with defining all the steps necessary to create a replica of my live site and make a test environment.

This much I know:

1) Create a copy of the DB and give it a new name (i.e. prestashop_dev)
2) Copy all files from live site to the directory of the new website domain (i.e. from www.myshop.com to www.mytestingshop.com)
3) Change the /config/settings.inc.php file to point to the new test DB (The copy from step one)

That's as far as I've thought it through. Can someone please elaborate?

Cory

www.OutdoorStore.ch



Anything else I have to do for copy a site?
Link to comment
Share on other sites

You will also need to regenerate your Google Sitemap file. I think that's all you need to do, unless your base directory in config/settings.inc.php has changed. If it has, you will need to regenerate your .htaccess file and robots.txt file.

Link to comment
Share on other sites

please make sure your .htaccess file contains following lines, if it does not, you can add them manually.
(Here assume your store is installed at /shop/)

RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/p/$1-$2$3.jpg [QSA,L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/p/$1-$2.jpg [QSA,L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/c/$1$2.jpg [QSA,L,E]

Link to comment
Share on other sites

The .htacess file looks like this. I have modified both files. 1 file in root folder of /shop/ and second in the /shop/config/

SHOP - My shop dir.

RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/p/$1-$2$3.jpg [QSA,L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/p/$1-$2.jpg [QSA,L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/c/$1$2.jpg [QSA,L,E]

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# Catch 404 errors
ErrorDocument 404 /404.php
Link to comment
Share on other sites

I just took a look at your site.

1. Friendly URL is not enabled at your site, so ,maybe you should remove your .htaccess
So the problem might have nothing to do with .htaccess file.

2. I noticed the following two images, A is ok, B has problem.
A. http://********/img/p/376-1504-home.jpg
B. http://********/img/p/918-3060-home.jpg

Please confirm that image B "918-3060-home.jpg" does exist at your folder /img/p/
And please also confirm that image B has the same permission setting as A.

Link to comment
Share on other sites

Yep, it's likely your FTP client. Some clients have a limit on how many files in a directory are displayed. Since there are many images in the img/p directory, it is likely the maximum limit was reached and not all the images were copied. You should use cPanel to create a backup that includes all the images.

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