traughber Posted May 18, 2011 Share Posted May 18, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/236754-putting-your-first-php-site-online/ Share on other sites More sharing options...
JonnoTheDev Posted May 18, 2011 Share Posted May 18, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/236754-putting-your-first-php-site-online/#findComment-1217065 Share on other sites More sharing options...
traughber Posted May 18, 2011 Author Share Posted May 18, 2011 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. 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. Quote Link to comment https://forums.phpfreaks.com/topic/236754-putting-your-first-php-site-online/#findComment-1217113 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.