Forum Moderators: phranque
How do you update? Is there a faster way? E.g., using symlinks and telling httpd to use a different directory after production, which would effectively mean to swap directories.
that is a lot of pages .. well I wont ask why you need so many ...
"with no delay for the visitor?"
Well if its just a change to a site wide menu or something you could use something like SSI (server side includes) and then when you made a change to the included code, it would work across all pages as soon as it was made.
But I will ask how you create the pages offline as I also create some sites offline also in a semi automated way .... by building a database of contents .. various page templates, inc menus, drill down page queries etc then merge them all into static html pages - I can test most of the sites offline and then just ftp the lot up to the webserver ....
But .. these are perhaps 300-500 page sites ... I would not do that for 70,000 pages as page creation and ftp etc would just take too long ... what I might do (and in this I am not yet expert by any means) is move a contents database online with templates etc and allow the server to create the pages on demand from users.
Then when I wanted to update the site I would update the database online or offline no matter .... anyhow updating just the database plus any changes to the templates ... rather than creating all the 70k pages ....
does that make sense for your application?
if not what is it that you are doing?
or
just swap the 2 folder names containing the old and new sites.
or
get creative and add a folder name (such as 'foo') to all your urls, then do a mod rewrite to change /foo/ in the requested url to the day of the year, then in the folder named /187/, which would be tomorrow, you have tomorrows site. Then your site changes automatically at midnight... get the idea, lots of possible ways.
Btw, I use a self-written engine, using Java, XML, MySQL and Velocity.
trillianjedi, I would need the symlink for accessing the "stable" content from the freshly generated. If I publish to a different location and want to test it online, I have to symlink the stable stuff like images and css.
netcommr, hadn't thought about rewriting. How can I achieve the switch fast? I thought of "httpd restart", but this also takes some time. It could mean that "you pull a page from a viewer's butt" if he tries to load it in the same time. Is there a fast ways to tell httpd that the document root or the rewriting rules have changed? How are the monster sites doing this (if they use static html)?
I suggest that you use XML with CSS for your web site. It might be better to use a database for the content but you export it into XML files every now and then. This is much faster and easier to maintain.
Luck!
piramida, what do you mean by "CP"?
Yes, I have a script on my box called "httpd", it supports the "restart" command.
Guess I really have to wait for the traffic slowing down. Problem is, that my site is pretty much aimed at international visitors so there is no such thing as fixed slow down, but maybe I can spot some calmer hours.