Jump to content

Installing testing environment


Recommended Posts

Hi guys,

 

I currently have Prestashop installed in a folder called "prestashop" and have been using a 3rd party theme called "theme1005" as the default.

 

I have customised it and have records in the database.

 

I want to know how to set up testing environment to install a "clean" version 1.6.0.9 of Prestashop using the "clean" zip file from the Prestashop website.

 

I have the following questions.

 

1. Is it a simply matter of installing version 1.6.0.9 into it's own folder, ie: prestashop1609?

 

2. I want to also use the third party theme, theme1005 in the testing environment and use the same database (don't worry, I will have backups). Do I just point the new installation to the same database?

 

3. How do I get theme1005 into the testing environment?

 

Thanks regards

Greg

 

Link to comment
Share on other sites

Hi,

 

I'm trying to figure out the best way to setup a testing environment using existing production data in my database and the theme I am using as the default.

 

 

Should I do the following:

 

1. Take a complete backup of the existing production Prestashop folder, "prestashop" and the production SQL database (called ps_production) and put it somewhere safe.

 

2. Should I export my 3rd part default theme (theme1005) for possible installation into the new testing environment?

 

3. Install a clean installation of the new Prestashop version that will be used for testing purposes (ie: 1.6.0.9) into a new seperate folder called "prestashop1609" and point it to a new database called ps_testing.

 

4. Import into the testing database (ps_testing) all tables etc from the production database backup (ps_production)?

 

It is from # 4 above that I am not sure what to do next....

 

Should I import the production theme that I exported into the testing environment?????/

 

Thanks for any help you can provide.

 

Regards

Greg

Link to comment
Share on other sites

If you want a test site that is a duplicate of your production site, then yes #1.   Simply create backups of the web content "prestashop" folder, and your production database.

 

Then copy your "prestashop" folder to a new folder called "test" or whatever you would like it to be called.

Then create a duplicate database named whatever you would like it to be named.  Import your production database to this new database

Then on your new test store, edit the config/settings.inc.php file and update the database information so it points to your test database.

 

Then log into the back office of the test store, go to SEO and URLs page and change the Base URL from "prestashop" to your new folder name and save.

 

Presto... you now have a fully functioning duplicate instance of your production store.   Just play carefully here, your customers will get emails, your payment modules will function etc...

Link to comment
Share on other sites

Thanks mate

 

Ok, I'm now fine with what's got to be done in order to totally duplicate my existing production environment.

 

My next question issue is this:

 

Say my existing production site is Version 1.6.0.6 and I want to upgrade to 1.6.0.9. I recently performed a "1 click upgrade" on the 1.6.0.6 environment and whilst the upgrade worked, the layout of my theme1005 (my 3rd party theme that I use as the default) was altered and I couldn't figure out how to fix it. (I posted a question on this forum).

 

So, my questions are this:

 

1. If a Theme works on version 1.6.0.6 should I expect it to also work on 1.6.0.9?

 

2. If I create a clean 1.6.0.9 environment with the sample database that comes as part of a new 1.6.0.9 installation and then install Theme1005 from the installation file created from when I exported Theme1005 using the "Export Theme" option from 1.6.0.6, should I stand a better chance of Theme1005 working correctly?

 

3. Referring to # 3 above, if I this import the 1.6.0.6 database in the 1.6.0.9 environment, will that create issues?

 

 

I suppose what I'm trying to ask is, "what is the best method to test a new version of Prestashop using the theme and data from a production environment".

 

 

Thanks again for your help.

 

Regards

Greg

Link to comment
Share on other sites

1. If a Theme works on version 1.6.0.6 should I expect it to also work on 1.6.0.9?

 

No, I would not expect it to work properly.  With 3 minor releases, you cannot say with 100% certainty that a theme designed for ps v1.6.0.6 would work properly...  Too much could have changed between the new versions. 

 

However this should be easy enough to test...  Just install a clean PS v1.6.0.9 instance, install your theme and test it.  This will remove any questions about an upgrade breaking something.

 

2. If I create a clean 1.6.0.9 environment with the sample database that comes as part of a new 1.6.0.9 installation and then install Theme1005 from the installation file created from when I exported Theme1005 using the "Export Theme" option from 1.6.0.6, should I stand a better chance of Theme1005 working correctly?

 

I'm not sure why you would need to export the theme file from your old store?  What does this accomplish?  Why not just delete your theme, upgrade your store, and then re-install the theme?

 

3. Referring to # 3 above, if I this import the 1.6.0.6 database in the 1.6.0.9 environment, will that create issues?

 

As I said before, you cannot install a new version of PS and point it to an existing older version of Prestashop.  The database structure will change with each new release.  You can look within the folder "prestashop\install\upgrade\sql" and see all the changes that occur to the database with each new release. 

 

 

I'm still not sure what you are trying to accomplish.  I assume you want to upgrade your store.  But I can't understand why you are making this so difficult.

 

1) Make a duplicate of your store.  I already explained how to do this.  The upgrade guide on this website also explains how to do it.

2) Upgrade your test store.  Test it, if it works properly, then upgrade your live store.  If it doesn't work properly, then you need to determine what is not working, and how you will address those issues.

 

If you want to determine if your theme works properly on PS v1.6.0.9, then as I said earlier, install a clean copy of PS v1.6.0.9, and then install your theme and test it.

Link to comment
Share on other sites

Thanks for providing me with this amount of detail. I really appreciate it.

 

I understand what you are saying.

 

Regarding your question "I'm not sure why you would need to export the theme file from your old store?  What does this accomplish?  Why not just delete your theme, upgrade your store, and then re-install the theme?".

 

If I have customised the theme heaviliy, how do I retain the changes/customisation if I want to install it onto a new clean 1.6.0.9 environment? Are you suggesting that I install the original version of the new theme and then I need to "recustomise" it again?

 

I was expecting that when I exported a theme, it created an installation file containing the "customised" version of the template...is this not the case?

 

In summary, your saying:

 

1. Duplicate my existing environment completely (including database etc) in a test environment.

2. Perform an upgrade on top of the test environment. (do you recommend the "1 Click Upgrade" option?)

3. See what's broken and fix it.

 

Is that about it?

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

1. Duplicate my existing environment completely (including database etc) in a test environment.

2. Perform an upgrade on top of the test environment. (do you recommend the "1 Click Upgrade" option?)

3. See what's broken and fix it.

 

Is that about it?

 

Yes

 

I was expecting that when I exported a theme, it created an installation file containing the "customised" version of the template...is this not the case?

 

Yes, now that you have explained, you could do that. 

 

Now if you have only made changes to the the themes .tpl, .css and .js files, then alternatively you can install the original theme, and then just copy your themes folder from the old store to the new upgraded store.  The advantage of this is ...

1) You do not rely on the export/import process to actually work.  I cannot attest to this actually working properly.

2) You ensure that the original theme gets installed properly, and then you just overlay your file changes.

Link to comment
Share on other sites

Do you recommend "1 Click Upgrade" or some other method.?

There are 2 methods, autoupgrade module or the manual upgrade procedure.  I would suggest trying autoupgrade, if it doesn't work, then you only have one other choice.

 

How do I know what files are changed as a result of me modifying the theme?

 

Well, for starters, you should have kept track of them when you changed them.  Otherwise you would need software that can do file/folder comparisons.

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