Forums

[resolved] How much can I place outside of the root? (7 posts)

  1. drcarl
    Member
    Posted 1 year ago #

    Greetings from an almost total noob,

    I am trying to get my head wrapped around managing a WordPress site with Dreamweaver. My C:\ drive is a fast solid state drive, but is rather small
    at 80 GB. Generally, I place as much as possible on my 1 TB D:\ drive.

    I read that it's customary to put PHP files in the root to avoid duplication and to save time, so PHP (and MySQL) is operating from the XAMPP root on C:\. This is also where I have set up the "localhost" server...and is where WordPress resides.

    Now, for both testing and development, I come to defining a site in Dreamweaver and wish I had a better understanding of what's going to be around the next few corners so that I can make good decisions.

    Now that the above mentioned programs are functional from C:\, can I do the rest from D:\ ?

    For instance, somehow, as development unfolds, can I point Dreamweaver and WordPress to "_images" and "_css" and other resources and folders on D:\ ?

    Thanks in advance,

    drcarl

  2. s_ha_dum (was apljdi)
    Member
    Posted 1 year ago #

    I think you misunderstand something.

    For a web application to work you have to put your files in your server's root directory or in a sub-directory therein because that is where the server will look for files. Your server's root directory doesn't have to be the root of your C drive, or your D drive, or of any other drive. The server's root is where you tell the server it is. For example, on a Linux system it is fairly common for Apache's root to be something like /var/www/htdocs. (That would be something like C:\var\www\htdocs on Windows.) If you have more space on D, put the server root on D.

    You can still access files from outside the server root but you will need to trick the server into thinking that the files are in the root by means of aliases. I know that symlinks on Linux will let you access files that are otherwise not in the server's reach. I assume this works on Windows but I'm not sure. But if you have more space on D, put the server root on D. You'll be happier in the end.

  3. drcarl
    Member
    Posted 1 year ago #

    apljdi - thank you for your reflections. I'm going to remove everything and install as I usually do now that I know both meanings of "root."

    I hope the internet will teach me about aliases? when I need to know that.

    Be well,

    drcarl

  4. drcarl
    Member
    Posted 1 year ago #

    I have learned a LOT over the last 5 days, but still not enough.

    I am still unclear about what complications I might encounter if I attempt to set-up everything on my much more spacious D:\ drive. The only reason I am installing PHP is to use it as a local testing environment server. Nobody needs to access this machine remotely. The only 'remote' thing I'll be doing is putting the site(s) to a paid host.

    By "set-up everything" (and for insight into what I am attempting), I'm referring to starting from scratch (uninstall everything [easier said than done]) and then installing onto my PC which is running Win7 x64: WAMP (MySql, PHP, PHPMyAdmin) and then WordPress onto my much larger D:\ drive which is already home to Dreamweaver which I'll use to manage everything.

    I really don't know, yet I suppose there ~might~ be a need to change something in the "host" file which resides at C:\Windows\System32\drivers\etc.

    A few days ago, nothing was working until I "commented-out" some multiple entries with a "#" ["127.0.0.1 localhost127.0.0.1 localhost127.0.0.1 localhost127.0.0.1 localhost127.0.0.1 localhost"] and added "127.0.0.1 localhost" as a working line. I have no idea where the repeats came from.

    I also have no idea what I have to do to make "http://localhost" point to D:, of if that's even necessary.

    I have no idea what an alias is, of if one is needed.

    I don't know what access from "outside the server root" is, nor how to trick the server into thinking that the files are in the root by means of aliases, if needed.

    I'll appreciate any guidance.

    TIA

    drcarl

  5. drcarl
    Member
    Posted 1 year ago #

    PS - I kind of get back to my original question. As my site grows, I assume my local files will grow. I wish I know by how much. I also wish I knew how much could be easily stored on D:\ (if it's insanely difficult to put everything on D:)

  6. s_ha_dum (was apljdi)
    Member
    Posted 1 year ago #

    I don't foresee any complications with putting your server root on D:\ rather than C:\. I'd even say it is better to have the server root on a drive where the operating system isn't. And it would take you a very long time to fill up a 1Tb drive with php files. They are essentially text files. They aren't that big.

    I also have no idea what I have to do to make "http://localhost" point to D:, of if that's even necessary.

    'localhost' points to the computer itself, not to any particular directory on the computer. The 'http' prefix means 'look for a server on port 80 and try to connect using the http protocol'. Think of it like this. Pretend that your computer is an office and its telephone number is 'localhost'. 127.0.0.1 is exactly the same address. Now when you dial an office you often have a choice of extensions, right? Same with a computer, but they aren't called extensions, they are called ports. You may have encountered port numbers when dealing with ftp or email. There are lots of ports-- more than 65,000-- but most are not doing anything. When you install a web server, by default, it starts to listen to port 80-- it starts to answer the phone for extension 80. Get it? So you don't need to point localhost to a directory. After the connections is made to port 80 the web server takes over. Its the web server that needs to know where your files are. That was a bit of a long story, though remarkably engaging :), but WAMP should take care of most of that when you install it. The only catch is that, if you notice above, I said that 'by default' web servers run on port 80. They don't have to. You can install them to non-standard ports, and I think that WAMP does install to a non-standard port. It doesn't make any huge difference to you. Just follow the instructions for connecting. It basically means that instead of 'http://localhost' you'd need 'http://localhost:8888' or something like that, but I think that you can probably tell WAMP to use port 80 when you set it up though.

    Something else occurred to me though. If you are used to building in html/css then you are used to being able to create the whole site-- format, content, images, everything-- and upload the complete site. Because WordPress stores content in a database it is very difficult to work like that. You can make local changes to layout but most of your real content will be in the online database.

  7. drcarl
    Member
    Posted 1 year ago #

    though remarkably engaging :)

    I actually did chuckle out loud; thanks.

    don't foresee any complications with putting your server root on D:\ rather than C:\. I'd even say it is better to have the server root on a drive where the operating system isn't.

    This would be WONDERFUL news.

    The only catch is that, if you notice above, I said that 'by default' web servers run on port 80. They don't have to.

    I don't care what extension (port) the server answers just as long as the call gets answered! The story your related is a nice analogy and it took me up another notch of understanding. As each day passes, my vocabulary and concept understanding increases.

    If you are used to building in html/css then you are used to being able to create the whole site-- format, content, images, everything-- and upload the complete site. Because WordPress stores content in a database it is very difficult to work like that. You can make local changes to layout but most of your real content will be in the online database.

    I am not used to anything! [insert laugh track here] I did build a website for my sister a few years ago. I used Dreamweaver and modified a template. There were some really basic (and important) things I just could not figure-out (tables, text-formatting). I did make nav bar buttons and a little movie for the header. I was amazed that the site actually worked. It was a beautiful site even before she hired a geek to slick it up with a bunch of Java.

    I have been developing original content for two (or more) sites for a couple of years and am finally getting to the 'make a working website' stage. I am taking video courses on lynda(dot)com that are helping a lot. Currently I am completing one on using Dreamweaver CS5 and WordPress 3 to manage, manipulate, tweak, modify and otherwise run a site. There have been PHP and CSS modifications, and Dreamweaver CS% even has special functionality developed into it for CMSs like WordPress such as 'site specific code hints.'

    What I am trying to say in regards to where most of my content will be is that ALL of my content will be in (at least) two places: on my D: drive AND copied to the online server.

    Thank you very much for your clarity.

    Gotta love it when people help others.

    Rather amazing, really.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags