Welcome Guest, Not a member yet? Register   Sign In
Upgrading a live site
#1

[eluser]txomin[/eluser]
Thank you in advance, good folk.

I have a CI site with some 1,500 users, 10% of which are logged in and working at any given time.

I would like to ask the advice of experienced people regarding how to handle upgrades to a live site.

Up to this point, when I want to update something, I just upload it and hold my breath, hoping that nothing breaks in the process (you know, a user clicking on something that is temporarily out of whack). It seems the worst possible way of doing this.

As I know consider upgrading to a new version of CI, I am in a panic and keep postponing it. Other major updates to the site have also been postponed indefinitely due to this problem.

Any advice, pointers, links are most appreciated.
#2

[eluser]cahva[/eluser]
The answer is quite simple: use a different server to do the development Smile And while you're at it, start to use some kind of versioning so you know better what changes you have made(and you can roll back if you need to). My usual workflow is that I develope using our projectserver, commit changes to repository quite often and when I reach a milestone, I pull the changes from the repo to the liveserver. I use Mercurial for version control, but you can use whatever you like.. Most important thing is that you just use some kind of version control Smile
#3

[eluser]txomin[/eluser]
Thank you for the quick reply.

I'm afraid I didn't explain correctly. I do develop in a different server. The problem is not development. The problem is the actual upgrading process from my development environment to the live site. Is service in the live site not interrupted while files are being deleted and copied? It must be the case.

Of course, if it is a single file, it should not be a problem. But if I'm upgrading to a new version of CI together with changes to the site's code, the upgrading time could be several minutes (at least). Would it not be the case that users would be affected?
#4

[eluser]Developer13[/eluser]
1. Replace index.php (the front controller - all requests route through this file) with a file notifying the user that the site is temporarily down for maintenance.

2. Do whatever you need to do to upgrade CI, but don't upload the new CI index.php just yet.

3. Make sure all your config files have the proper variables set.

4. Upload the new CI index.php and overwrite the placeholder file you created.
#5

[eluser]AreN[/eluser]
Hello

That's one way to do it.

What one usually does is add some notice on the site about a maintenance schedule, a good while before it takes place. Then you redirect users to a html page telling the site is under maintenance. You could redirect with a HTTP 302 using apache. When you are done you remove the redirect.

Hope that was of some help!
#6

[eluser]txomin[/eluser]
Very useful. Thank you guys.
#7

[eluser]John_Betong_002[/eluser]
Try:

1. thoroughly test the new application locally
2. rename localhost 'application to 'application-NEW'
3. upload local 'application-NEW'
4. index.php add echo 'Updates in progress';die;
5. rename on-line 'application' to 'application-YYMMDD'
6. rename on-line 'application-NEW' to 'application'
7. rem index.php --> // echo 'Updates in progress';die;

Monitor the error log file.
 
 
#8

[eluser]txomin[/eluser]
It makes sense. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB