Author Topic: How to use a test site?  (Read 2081 times)

Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
How to use a test site?
« on: January 10, 2017, 11:37:20 AM »
Hi guyz!

I was wondering, since I want to upgrade the core system files, what is the best way to create a test site?

I created a live site and I am working with only that. I make backups every day I edit something, and I also backup the files from the "import-export" section, just in case.

I tried to simply create a subdomain names "test.mysite.com" and clone my site on it. At first, it worked, but as soon as I installed the update, I got an error message (Not acceptable 406 + index.php). I asked my hosting provider to disable the mod_security yesterday and it works for my main site, but not for the sub-site for testing. I am asking them now to check that.

So, that being said, once the test site is installed, how do you use it?
You make all your changes in the test site, then clone it to the live site? Or backup the files and export them on the live site with the import-export menu? Or do you use fpt for that?

Does the testing site has to be ssl?

I just want to be sure to use AbanteCart at its best and to have a great website for my customers... I have spent countless hours working on my first site, just to lose it all in a hosting failure and without backups, I want to be sure that never happens again!

Thanks for the infos!!

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1270
  • Karma: +317/-2
    • View Profile
Re: How to use a test site?
« Reply #1 on: January 10, 2017, 02:22:36 PM »
do you have CPanel with Softaculous?  If yes,  I will provide you some helpful/easy ways to accomplish your test site


Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: How to use a test site?
« Reply #2 on: January 10, 2017, 02:30:03 PM »
Yes I have CPanel and Softaculous!

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1270
  • Karma: +317/-2
    • View Profile
Re: How to use a test site?
« Reply #3 on: January 10, 2017, 03:07:07 PM »
https://www.softaculous.com/docs/Clone

this is a good guide in the details of cloning your site

please read it with care -  but it will allow you to make an exact copy of your exisitng site - including keeping your login creds the same.

The easiest way I have found it to clone your site to a subfolder -  eg if you have your working site   in yourdomain.com/store   then have it cloned to yourdomain.com/test  or what ever name you want.   If your workinng site in in root,  you can still do it the same way,  but you may have to manually add the /test  to your htacess.  file.

Once you have this cloned you,  work in that -   running an update,  adjust some feature to see how it might affect something -  in other words  you treat this as a sandbox to test any new function and see if the results are desireable,  but you do not affect your working site.   This becomes quite important after you publicly launch your site. 

Additionally  -  softaculous is a good way to make a complete backup of your working installation with database.   I recommend you to do this prior to making any changes.   If anything goes wrong ,  the restore feature from the backup is very easy and fast.

https://www.softaculous.com/docs/How_to_Backup_an_Installation

If you did not use Softaculous for your original installation -  you will need to import your working site into the Softaculous dashboard in order to clone, etc.

https://www.softaculous.com/docs/How_to_Import_an_Installation


Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: How to use a test site?
« Reply #4 on: January 10, 2017, 03:20:50 PM »
Thank you very much for all that! I'll try this on right now... ;)

Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: How to use a test site?
« Reply #5 on: January 10, 2017, 03:41:31 PM »
Aaaaarrrhhh.... It DID work... until I upgraded my test site (mysite.com/test) to 1.2.9... now I've got the same warning I had on my test.mysite.com... 406 + index.php .... It was supposed to be ok...

Positive point of that: It did NOT crash my live site... XD

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 3152
  • Karma: +149/-0
    • View Profile
Re: How to use a test site?
« Reply #6 on: January 18, 2017, 03:08:50 AM »
ask you host to improve mod_security for test site too
“Chuck Norris is so amazing.”
― Mother Teresa

Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: How to use a test site?
« Reply #7 on: January 28, 2017, 08:57:47 PM »
https://www.softaculous.com/docs/Clone

this is a good guide in the details of cloning your site

please read it with care -  but it will allow you to make an exact copy of your exisitng site - including keeping your login creds the same.

The easiest way I have found it to clone your site to a subfolder -  eg if you have your working site   in yourdomain.com/store   then have it cloned to yourdomain.com/test  or what ever name you want.   If your workinng site in in root,  you can still do it the same way,  but you may have to manually add the /test  to your htacess.  file.

Once you have this cloned you,  work in that -   running an update,  adjust some feature to see how it might affect something -  in other words  you treat this as a sandbox to test any new function and see if the results are desireable,  but you do not affect your working site.   This becomes quite important after you publicly launch your site. 

Additionally  -  softaculous is a good way to make a complete backup of your working installation with database.   I recommend you to do this prior to making any changes.   If anything goes wrong ,  the restore feature from the backup is very easy and fast.

https://www.softaculous.com/docs/How_to_Backup_an_Installation

If you did not use Softaculous for your original installation -  you will need to import your working site into the Softaculous dashboard in order to clone, etc.

https://www.softaculous.com/docs/How_to_Import_an_Installation

Hi there, me again... :)

Now that all my 406 ans mod_security problems are finally over, I'm trying to use the test site.

I cloned the original site into a test site, then upgraded it to 1.2.9... No problem there.

I made backups of everything, and imported all from the "import/export" section too.

Now HOW do I use that? I tried to take the files from my test site to my original site (ex: the products table, import the test file into the live site) and it did not work...

Am I using it wrong? Am I supposed to be able to transfer files from one an other or do I have to do it in the test site, test it, and then do the same in the live site?

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 3159
  • Karma: +227/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: How to use a test site?
« Reply #8 on: January 29, 2017, 01:04:46 PM »
Setting up test sites was covered in the forum before. 

Anyways, the best ways to create a test site is to clone (copy) code and database entirely and replace couple of configurations.

1. You copy code to new server/location entirely.
(here to can use scripts for automatic sync if needed later) 
Exclude copy of the system/cache folder content.

2. Export database (with mysqldump or other tools) and import to new database on server/location

3. Edit settings.
- Update system/config.php for new database and other setting if needed
- Update settings table in the database to have new store_url (ssl if needed)

That is all.


 
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: How to use a test site?
« Reply #9 on: January 29, 2017, 08:58:11 PM »
Thank you for your answer, but it is not entirely what I was meaning...

I meant more HOW to import the database in the new website?

My test site is updated and the backups are done, from there, what do I do to put it on my live website?

I built my test site after my live one, do I have to delete the live one first to be able to clone the test on it?

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 3152
  • Karma: +149/-0
    • View Profile
Re: How to use a test site?
« Reply #10 on: January 30, 2017, 01:01:15 AM »
“Chuck Norris is so amazing.”
― Mother Teresa

Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: How to use a test site?
« Reply #11 on: January 30, 2017, 01:43:12 AM »
Ok, I will re-explain my question...

I have a test site, and a live site.

The test site is used to test upgrades and new plugins, right? Then when they are tested and working on the test site, how do I put them in the live site?

Do I uninstall the live site to clone the test site on it, or do I simply have to transfer some files?

I read the "how to change domain", I get it, but if I edit my test site 2-3 times in a month, do I have to do that all over every time?

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1270
  • Karma: +317/-2
    • View Profile
Re: How to use a test site?
« Reply #12 on: January 30, 2017, 04:03:04 PM »
in my above post -  I provided links to the Softaculous docs.   Here is the complete list link - I recommend you read the docs for details on how to use Softaculous to manage your testing site.

https://www.softaculous.com/docs/Category:Endusers

Here is a quick instruction -   
When you cloned your working site -  you made an exact duplicate, including your database with a different url.  eg.  domain.com/store,  cloned to domain.com/test. These are two complete and independent installations -  what you change and test for in /test will NOT affect  /store.

My recommendation   -  is once you have gotten your changes tested in /test and then you should make a backup (in Softaculous) for /store so you can roll back quickly if things go wrong.

Then depending on your changes to be made in your /store site (the same ones you made in test)  you may want to place your /store into maintenance mode so no new orders etc are taking place while you are updating your /store.

Since you tested in /test and believe your changes will work,  doing the same thing in /store should work the same.   If your /store did not update the way you hoped  -  then immediately restore to the backup you made just prior to your upgrade.

I am assuming your /store is operational and having ongoing orders etc.   If this is not the case,  and you are in startup development and your /test changes are what you want -  AFTER making the backup of /store,   then you could clone your /test  back to /store -  this will give you /store with all the changes you made in test .  THIS SHOULD ONLY BE DONE if /store has not received any customer orders etc while you were working in /test.  If your /store is active and you clone /test then all customer activity (orders, etc) will be lost.

 

Offline bppe

  • Newbie
  • *
  • Posts: 26
  • Karma: +2/-0
    • View Profile
Re: How to use a test site?
« Reply #13 on: January 30, 2017, 05:04:26 PM »
Thank you very much, this is exactly what I wanted to know!

Offline Arydigital

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: How to use a test site?
« Reply #14 on: November 07, 2017, 05:15:49 AM »
Thank you very much for all that! I'll try this on right now... ;)
do you have CPanel with Softaculous?  If yes,  I will provide you some helpful/easy ways to accomplish your test site

 

Cheap Prom dresses 2018