Jump to content

Putting your first PHP site online


Recommended Posts

Hello everyone,

 

My name is Kris.  I have a question about putting my first PHP site online. 

 

I've Googled the heck out of this with phrases like "how to put your php website online" or "publishing your first php website" (I used other search terms as well), but surprisingly didn't find anything good.

 

Out of all of the books I've looked at and articles I've read, I haven't seen any kind of guide for how to put your first site online. I'm talking about more than just finding a host and uploading your files via FTP. I'm talking about all of the little things that you have to configure to get it to work like relative paths/URLs, security setup, etc. The question is, assuming you're developing locally with some package like XAMPP (I'm using XAMPP on Windows XP and 7) and using all of the default configurations, what are all of the things you'd have to do to take your site live?

 

I apologize if I'm missing something and this is an obvious question, but any tips and/or resources would be greatly appreciated.

 

Thanks.

 

Link to comment
Share on other sites

I'm talking about more than just finding a host and uploading your files via FTP

Actually, that would be the first thing that you should do, including setting up any databases on your webhost.

 

Any problems that you have after you have got your site uploaded and changed your database connection settings (if you have any) you can tackle at that stage with help here.

 

There is no guide as such as there are many different server environments, server configurations, php configurations, etc. For example, a dedicated server differs greatly from a shared hosting server. If you are a competent coder then you should be creating scripts/websites that can be deployed in any or most php environments. Server paths & filename shouldn't really be hard coded into scripts, and if they are should all be placed in a single configuration php file that you can ammend if you migrate your website. There are php variables and functions that can be used to set & get path & file values dynamically i.e

 

/*
abs path to the website document root
*/
$_SERVER['document_root'];
/*
abs path to the directory where this file resides
*/
dirname(__FILE__);
/*
the name of the current file
*/
basename(__FILE__);

 

Look these up in the PHP manual.

Link to comment
Share on other sites

If you are a competent coder then you should be creating scripts/websites that can be deployed in any or most php environments.

 

I'm not competent at all.  :D  I'm just starting out.  As part of my learning, I've chosen to create a site that's for my personal use for the time being (although I know others that would use it once it's refined).  My plan is to find a free web host so that I can use it at home, work, or wherever.  To develop my site, I just installed XAMPP and left all of the defaults.  So, as you can see, I have no clue what to do in order to put it up on the web.  Thus, the reason for this post.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.