• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Live Site and Test Site?


I haven't tried this before.

How do I test the codes in the live site?,
without modifying it while it's running live?

How do I separate a Test Site for testing purpose?

Thanks in advanced.

[eluser]Rok Biderman[/eluser]
Well, the safest way to not mess anything up is to have a test site. If nothing else, your changes are probably going to affect the db and if anything goes wrong good luck finding out which changes are yours and which were made by other users.

If you use some kind of version control (i.e. Git), it's very easy to maintain two separate branches, one of which deploys to test and another to production (using git-ftp for example). Once you're satisfied with everything, you just merge into production branch nand redeploy to live site. It's an investment in time but it can save you a lot of confusion later on.

thanks for the git advice.

A couple of things going on,

If you go with a test site and a deployment site you'll want to set up two different congig files. Check out
and the link at the bottom of that.

You'll have to change some function/code around to handle this. For example, you should have a "testing" email account, and anything that sends an email (ie, user registration, someone posts a reply to a forum thread, etc) in your testing/development environment should send to that email account, not the actual users account - your users wont be happy if they start getting emails because you are testing stuff!!!

You'll also need to update your database stuff (which Coccodrillo touched on) so that you have "mirror" databases, one live, one for development. When you make a change to your testing DB (I'm talking about structure, not content), make sure you save the syntax into a "patch" file for that release, and just before you go live with your new branch you can then just copy and paste that "patch" sql syntax into your live db phpmyadmin sql panel and presto, your live DB is now a mirror again of your test DB (in terms for structure, not content).

Just a couple of things to consider.

[eluser]Jason Hamilton-Mascioli[/eluser]
With regards to testing database schema ... when making a database updates on your test environment the easiest way to deploy the new schema for your database is using some sort of migration tool. I know this is a bit off topic but I just want to make this aware to you ... something like https://github.com/tomkrush/codeigniter-migrations

How about I put a (maintenance message) on the index (front page) of the site.
So I can fix the site.

By the way how to do this?

Simply route it on the time of maintence to some controller that is doing it.
ps. the route should be $route['(:any)'] = "/maintance/index";
that way the user can Not go anywhere else as the only route aviable is to maintance index
also dont forget to comment all previus route's of your...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.