When you connect to your host you are not taken directly to the main folder of your blog which has all the files, you are taken to the folder directly above it. The top folder of your hosting area has various areas including stats, email account info and whatnot. The folder where you upload all the files to your live website is here too. With the majority of hosting websites this directory is callled public_html however it can be called anything. If public_html isn’t there then consult your host to determine where your main directory is stored (public_html is nearly always used with linux hosting, windows servers sometimes use something else like www).
The highest level of your hosting space not being where you upload your website files is something that causes a lot of problems for new webmasters. The most common error is uploading all files to this area or a random subfolder instead of under public_html.
Have a look at the screenshot below to see what I mean : 
You will notice that there is a trash folder, temp folder, email folder as well as some other files. This should be the kinda thing you see if your host is using cpanel.
If you want to upload index.php then you need to upload the file to public_html/index.php for the file to be live on your blog/site. If you upload it to /index.php or /tmp/index.php then the file will not be displayed on the internet.
Remember the ‘Initial Path’ section in the connection details. If I had to enter /public_html/ for the BloggingTips connection then when I click connect I would be taken directly to the folder which has all the files for the blog and forums.
If you look back at the screen print you will see a folder called www. You can also upload files to this folder (nearly always!). The www folder simply redirects to the public_html folder – ie. you could upload your index.php file to the www folder but the relative path should still be something like /home/blogsite/public_html/index.php. This is simply because www is simply a shortcut.
In Summary, always make sure you upload to the correct file directory – this is nearly always public_html but check with your host if it isnt there.
Friday, March 5, 2010
Step 3 – Connecting to the correct area
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment