ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Working with a live site...

July 19, 2007 6:18am

Subscribe [4]
  • #1 / Jul 19, 2007 6:18am

    stage5

    13 posts

    Hey Everyone,

    Thanks so much for all the help you’ve given me so far on any questions I’ve had 😊

    Anyway, I was wondering about installing and building a site with EE, while a live site is already on the server in XHTML/CSS. I have been working with the core version, but now I have a client that would like me to take the website I built for them, and install a cms without taking the site down until I upload the new, cms driven version…How would I install the new EE site “backstage” so to speak, on the same server, without taking down the live site until I’m ready to make the final switch (I want all the files to remain the same urls, as they have incoming links that would be a terrible thing to waste…)?

    I know I need to install EE in the main root (domain.com/) right? How would I accomplish this? Thanks for the help!

    -Danny

  • #2 / Jul 19, 2007 8:40am

    Sue Crocker

    26054 posts

    Danny, is the live site using index.htm or index.php?

    What I do is install EE in the main directory of the site, and depending on whether or not the live site is using index.php or index.htm, I upload either EE’s index.php or a renamed index.php. (Something like newsite.php).

    During the install, you’re asked which file is the index file, and you can put in newindex.php. After you’re ready to switch to the updated site, you rename or remove index.htm or the older index.php, rename newindex.php to index.php, and inside the CP, set the value of newindex.php to index.php.

    Voila! It works. You can test using newindex.php in the meantime.

    Does that make sense?

  • #3 / Jul 20, 2007 3:46pm

    stage5

    13 posts

    thanks so much guys….


    so if I’m working in the directory on indexnew.php, and then switch it over, I don’t have to do anything technical with the database once I switch to index.php and delete index.html (the old home page)?

    also, what about the other pages….its pretty critical that I keep some of the page URLs intact due to incoming links. For instance, I want to keep domain.com/about-us.html (and not domain.com/about-us.php) and still have the full functionality of EE. Is that possible? I thought maybe I had seen it done on some sites I knew were working with EE…

    Thanks again for the help!

  • #4 / Jul 20, 2007 4:12pm

    Sue Crocker

    26054 posts

    also, what about the other pages….its pretty critical that I keep some of the page URLs intact due to incoming links. For instance, I want to keep domain.com/about-us.html (and not domain.com/about-us.php) and still have the full functionality of EE. Is that possible? I thought maybe I had seen it done on some sites I knew were working with EE…

    EE 1.6 comes with the Pages module which will allow you to do as you want. You’d have to get rid of the actual file you have in there right now, though.

    Disclaimer

    Here’s an example: http://www.eehowto.com/disclaimer.php—disclaimer.php doesn’t really exist. It’s one of my “pages”.


    And here is my about-us.html 😊

    About Us

    Disclaimer: I remove my index.php using an .htaccess file. Also not everything works on the site. 😊

  • #5 / Jul 20, 2007 10:04pm

    stage5

    13 posts

    nice…ok so your about us is a .html file, but its completely editable with EE?

  • #6 / Jul 20, 2007 10:40pm

    Sue Crocker

    26054 posts

    It’s a weblog entry tied into a template.

    The *real* address is http://www.eehowto.com/howto/info/about-us

    I added a picture of my grandson to the entry.

  • #7 / Jul 21, 2007 4:45am

    stage5

    13 posts

    oh I see….so the about-us.html isn’t a real file, it just redirects the EE weblog to that address when a user attempts to hit it (or does it just rename it with the htaccess file)? so true .html files aren’t possible with EE then (or the markup appears on the redirected page)? does having the redirect to your weblog effect your SEO in any way?

  • #8 / Jul 21, 2007 8:05am

    Sue Crocker

    26054 posts

    There is no .htaccess magic going on.

    EEDocs:// Pages

    The link above will give you more information about the Pages module. As to how it all works, I’m not certain.

    EE doesn’t create real files on a server for you. Your content resides in a MySQL database. EE presents what *looks* like a file or a SEO friendly URL.

    Where the Pages module will come in handy for existing sites is that you can move the content into EE, remove the physical file, and set the link to the entry/template connection to match what you used previously.

    The Pages module is brand new to EE, so we’re just now finding good uses for it.

  • #9 / Aug 04, 2007 1:08pm

    stage5

    13 posts

    Thanks for the replies Sue…

    sorry it took so long for me to get back on this, took a little vacation 😊

    so as victor mentioned above, can I install and construct the EE site in seperate directory (domain.com/ee) and then change it to domain.com/ when I’m finished and overwrite the existing site? Is there much to this or do I just changed the root folder details in EE? Also, what does your .htaccess file include that removes the index.php?  I would like to have links that are domain.com/example.html because I have incoming links already pointing to the pages listed at those addresses, and it would be bad if that page is now located at domain.com/index.php/example.html ... Thanks for the help!

    -Danny

  • #10 / Aug 05, 2007 12:32pm

    Robin Sowell

    13255 posts

    It’s easy enough to move it up a directory- I’d just put a copy of index.php and path.php on the main level- then switch the path to the system folder so it drills down one more level (in your path.php file).  Change your path settings in the EE backend where needed and you’re good to go.

    As to htaccess- that’s not officially supported as how/whether it works may vary by server.  But the wiki has a nice entry on a couple of ways to do it via htaccess.  (I do it myself.)

  • #11 / Aug 05, 2007 2:05pm

    narration

    773 posts

    Robin, I agree this is a good way, and should help Danny with his concerns about working on an active website.  I use it myself, and it is very effective once you understand carefully what to put in the path.php file for a given folder.  As you showed with your link, it’s well documented.

    I wanted to address one or two more of the questions Danny keeps asking, one way or another.

    —on Pages and paths.  Yes, you can use the Pages ability to actually appear to have an html file when none is present in an EE installation.  I tried it to physically verify last night, but from the way EE works it is also clear.

    What helps to understand this is to see the basic EE model of processing, which for some reason is nearly a hidden element.  It is actually very simple at the top.  EE is called by the index.php part of the path, which occurs right after the site URL.  All the other parts of the path are looked at by EE to decide what template to call, and what variations of data and flags are sent to it. 

    So EE can decide if part of your path is ‘about’, ‘about-us’, ‘about-us.html’, or about-us.wazoo’, that it should reply from its ‘about’ template.  You can set up a specific mapping you want using Pages.  You specify the artificial ‘pagename’ you want, and the template you want it to call, using the Pages tab of the template editor.  You can do this for more than one fake template if you need more than one match - like about.html and about.htm.  You just point the extras to the same active template, say ‘about’.  The extra templates can be dummies since they will never be called.

    I would question that you need or should do this for something as generic as ‘about-us’.  Surely no-one links to that, so the new simple address in the EE site ought to be fine.  Probably you have some mystery you don’t want to tell us which is the hot linked page, and you can use the above to accomplish keeping an equivalent around for these old links.  Be sure you match the ‘htm/html’ naming exactly.  I don’t think you need multiple names anywhere.

    Before you ask it, no, none of this will be affected in inself by an .htaccess file of any normal kind.  Your whole site can be, but consider the explanation above, and realize that the index.php file is invoked no matter what you do to ‘hide’ it, as so many of us do.

    —on all these questions you ask around circles, Danny, I think there is really one solution.  You should invest in a $99 Personal license. 

    Then you get all the modules including Pages.  You get support.  You can build the site up in another directory, so it’s out of the way always.  As Robin suggests, you can operate the site from there, but also from a third directory to mimic the eventual root installation, with nothing in it but index.php copied, path.php copied and modified, and possibly an .htaccess, when you get to that.  You can try all this out, and see for yourself (and learn to set it up, a step at a time).  Your installation site is there to work with always, until you do get the separate directory method worked out.

    Similarly, you can try out (and work out your own) the ‘classic method’ so many of us use for removing the index.php name in the URL, from Robin’s document.

    I think you will find that hands on experience is the key for most anyone here.  Some of us may even be ‘experts’ of some kind, or not at all, but everyone gets it done this way.  There are too many variations to do otherwise.  EE is a very useful system, and a pretty practical one when you get down to it.  It’s really the web, php, and other gremlins that make things complicated; and so you need to become familiar and confident with enough of the patterns that work.  Not much different from your Dreamweaver html and css there.

    You’re fortunate to have the html/css background, as EE is designed to fit that.

    If you do this off-site/onsite method, you’ll properly gain confidence.  And then when the day comes, it takes installing 2 files on the root of the system, while renaming the original index.html.  Three files if you use an .htaccess.  That’s all. 

    You’ll know it will work, because you’ll have learned from your efforts before.  You’ll have most of those two (or three) files from having done it already by running your original installation from another directory.  And you’ll know why and how to change the path.php so running from root directory will work just as well, from your installation which has never moved. 

    Danny, I hope this helps.  Support is support, and you can notice they help people when those persons try and learn themselves.  Then there is something besides the hypothetical to work with, and also they can be confident that a persons is learning to fish, and support themselves.

    Kind regards,
    Clive

     

    It’s easy enough to move it up a directory- I’d just put a copy of index.php and path.php on the main level- then switch the path to the system folder so it drills down one more level (in your path.php file).  Change your path settings in the EE backend where needed and you’re good to go.

    As to htaccess- that’s not officially supported as how/whether it works may vary by server.  But the wiki has a nice entry on a couple of ways to do it via htaccess.  (I do it myself.)

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases