Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default root or subdirectory?

    On a website that only hosts zencart without other content, what's better, installing zencart in the root, or in a /store/ subdirectory?

    I currently have it in the root, but it's a pain to test an upgrade or mod and switch over to the new version when ready. I have to upload the new version twice - once to test, and once again in the root to go live. I have a lot of media files, so it takes hours, and doing it twice takes all day. The advantage I see with a subdirectory is ease of testing upgrades/mods and switching over very quickly by simply renaming the folders and swapping the configure.php files. It also would let me switch back to the old one quickly if something goes wrong.

    What are the disadvantages of having a subdir? A shorter URL length for user-friendly purposes doesn't seem to make sense, because the zc URLs to product pages are already so long that nobody is going to be trying to remember them and typing them out, and they already often get broken in emails due to the length.

    If I change it to /store/, I might do something to invisibly redirect the root to /store/ so that the URL remains shorter. Is there any disadvantage to doing that? Any special considerations given that my store is currently in the root and I don't want to lose traffic?
    Last edited by fakeDecoy; 24 Apr 2011 at 06:42 PM.

  2. #2
    Join Date
    Jan 2009
    Location
    Ireland
    Posts
    431
    Plugin Contributions
    0

    Default Re: root or subdirectory?

    The advantage I see with a subdirectory is ease of testing upgrades/mods and switching over very quickly by simply renaming the folders and swapping the configure.php files. It also would let me switch back to the old one quickly if something goes wrong.
    So why not just have your test store in the sub?

  3. #3
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default Re: root or subdirectory?

    Quote Originally Posted by Donal View Post
    So why not just have your test store in the sub?
    I don't think I understand your question. I outlined the reasons in my first post as to the drawbacks of having only the test store in a subdir. Am I wrong that it isn't possible to quickly switch between versions when doing it that way? Have I overlooked something?

  4. #4
    Join Date
    Jan 2009
    Location
    Ireland
    Posts
    431
    Plugin Contributions
    0

    Default Re: root or subdirectory?

    Quote Originally Posted by fakeDecoy View Post
    I have to upload the new version twice - once to test, and once again in the root to go live. I have a lot of media files, so it takes hours, and doing it twice takes all day.
    Why do you upload it twice? can you not just use your ftp to move files from the root to a sub directory and vice versa? esp your media files

  5. #5
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default Re: root or subdirectory?

    Quote Originally Posted by Donal View Post
    Why do you upload it twice? can you not just use your ftp to move files from the root to a sub directory and vice versa? esp your media files
    Well that's pretty cool. I had a strange idea that FTP couldn't move directories, only add or delete. I guess that will work then.

  6. #6
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: root or subdirectory?

    if you want to use it for testing, why not installing something like xampp on your local computer and test zencart locally?

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: root or subdirectory?

    Moving a Zen Cart via FTP, even on the same server is a very slow process as FTP will send instructions to move each file individually, i.e. several thousand instructions with an overhead at each end for each one to handle them (on big sites I've seen this take hours).

    Much faster is to use whatever file manager is provided in your hosting account. Using cPanel this typically takes 2-3 seconds tops, even on the largest sites, which isn't wildly different to the time needed if you were using command line instructions directly on the server.

    At Kuroi, our approach is normally to create a local environment (xampp could be used for this). Deploy the files to a staging site, where the client can do user testing by zipping them up, FTPing the zip archive, extracting on the server on, using the file manager to move them into position. And then repeating the process from the staging site to the live site once the client's signed off on the testing. To deploy from one location to another takes under a minute, with the largest amount of time being spent on creating the zip archive (it's quick for us as we use Linux workstations, but would probably take rather longer if you're using Windows).

    Hope this helps.
    Last edited by kuroi; 25 Apr 2011 at 10:11 AM. Reason: Add detail about deployment process
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default Re: root or subdirectory?

    I thought the same thing about moving files by FTP, but yesterday I went and moved my whole site to and from a subdirectory in a matter of seconds via FTP. I used FileZilla.

  9. #9
    Join Date
    Jan 2009
    Location
    Ireland
    Posts
    431
    Plugin Contributions
    0

    Default Re: root or subdirectory?

    Quote Originally Posted by fakeDecoy View Post
    I thought the same thing about moving files by FTP, but yesterday I went and moved my whole site to and from a subdirectory in a matter of seconds via FTP. I used FileZilla.
    I do it on a regular basis via ftp and it takes seconds. I use coreftp

 

 

Similar Threads

  1. Replies: 2
    Last Post: 4 Sep 2014, 01:55 PM
  2. v153 Root or subdirectory?
    By robbie269 in forum Basic Configuration
    Replies: 27
    Last Post: 17 Aug 2014, 12:16 AM
  3. subdirectory to root
    By stitchnkitty in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 31 Dec 2009, 07:13 PM
  4. Replies: 1
    Last Post: 10 Jun 2007, 09:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg