Page 1 of 1

Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 9:29 am
by Todlerone
Hello everyone. Thanks in advance for any suggestions for this post. I've finished my simple (to start with) baseball site bases on mysql/php and need to move it from my localhost to my remote server. Not sure how to go about it properly. Any suggestions and/or related sites with good explanations would be appriaciated. Thank-you.

Re: Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 9:51 am
by Chris Corbyn
This is a fairly broad scoped question. For example you may need a MySQL database setting up as part of the deployment, or you may need some writable file paths.

Generally you can just ftp or scp the code to the server and it will run. Any database stuff whould be dumped out to SQL then imported on the server.

I guess you need to be more specific about what your app does and how it works :)

Re: Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 10:44 am
by Todlerone
Chris Corbyn wrote:This is a fairly broad scoped question. For example you may need a MySQL database setting up as part of the deployment, or you may need some writable file paths.

Generally you can just ftp or scp the code to the server and it will run. Any database stuff whould be dumped out to SQL then imported on the server.

I guess you need to be more specific about what your app does and how it works :)
Thanks for your responce Chris. I guess I'm most curious about my mysql tables. How are they moved? Or do I need to remake them. This is my first php/mysql web site so I'm alittle unsure as to the proper assurance that everything will find each other. Thanks

Re: Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 11:17 am
by matthijs
Do you have phpmyadmin installed? Using that it's fairly easy to export and import the db tables from one db to the other.

Re: Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 11:59 am
by Todlerone
matthijs wrote:Do you have phpmyadmin installed? Using that it's fairly easy to export and import the db tables from one db to the other.
Yes I do. I have WAMP server installed.

Re: Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 1:41 pm
by matthijs
OK, then if you go to the tab Export, select the tables you want to export, pick the settings you want ("Add drop table" etc), and save it as a file.

Then on the new server, go to phpmyadmin and go to the tab import, select the .sql file you saved earlier and it will import the tables.

Maybe you can learn a bit from the wordpress docs about phpmyadmin and other mysql admin tools
http://codex.wordpress.org/WordPress_Ba ... phpMyAdmin

Re: Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 1:55 pm
by Todlerone
Thank-you Chris, very much appreciated. In time I will look back at my early days of php/mysql and say wow what a dork I was. I really enjoy learning the php/mysql angle on web sites. I have made many html sites but want to progress. Better late than never I guess.

Re: Publish site (move from local to remote)

Posted: Wed Apr 09, 2008 6:47 pm
by RobertGonzalez
Let me say todlerone that you are doing something that few n00bs do: work locally for development then move up for production. That is awesome. I applaud you. I wish more new developers would do that.

Re: Publish site (move from local to remote)

Posted: Fri May 02, 2008 1:20 pm
by Todlerone
Everah wrote:Let me say todlerone that you are doing something that few n00bs do: work locally for development then move up for production. That is awesome. I applaud you. I wish more new developers would do that.
Well thank-you for the praise. I'll take what I can get. I really like PHP and enjoy the the challange of making my ideas come to life. My initial experience is making this web site for my baseball league. It is a small league of 8 teams and they really don't care for anything great, a complete schedule and standings only really. My goal is to biuld it into something fun and informative in many ways and try to keep players coming back often.

http://hmmspl.xcd.ca/index.php Here is the simple starting point soo far (hosted for now on my sister-in-laws studio site). I had expected to be furthur along but I have a 2 year old and a 8month old so time after work is limited at best. I try to work on code as much as possible at work then implement at home after nighty night time for the kids.

Thanks again for your guidance and encouragement... :D

Re: Publish site (move from local to remote)

Posted: Fri May 02, 2008 1:47 pm
by RobertGonzalez
<offtopic>
Todlerone wrote:http://hmmspl.xcd.ca/index.php Here is the simple starting point soo far (hosted for now on my sister-in-laws studio site). I had expected to be furthur along but I have a 2 year old and a 8month old so time after work is limited at best. I try to work on code as much as possible at work then implement at home after nighty night time for the kids.

Thanks again for your guidance and encouragement... :D
Sounds like me. I have five kids. Had 3 when I started coding. It was tough working full time, daddying full time, husbanding full time then trying to code part time. Keep at it, it gets better.
</offtopic>

Re: Publish site (move from local to remote)

Posted: Mon May 05, 2008 8:26 am
by shiznatix
As for the move of the files I have found that rsync works perfect. That way you don't have to remember exactally what files you have modified and move them 1 by 1 or even worse just copy the whole site over every single time (gasp!). I just edit away on my dev server and then when I feel I am ready I run my rsync script and it does everything for me perfectly. It also helps with config files that will be server specific because you can use the --exclude parameter and it won't check that file.

Anyway, check it out if you are feeling up to it.

Re: Publish site (move from local to remote)

Posted: Mon May 05, 2008 9:13 am
by Chris Corbyn
Everah wrote:I have five kids. Had 3 when I started coding.
It's amazing what these programmers can come up with these days 8O

Code: Select all

<?php
 
class ChildFactory {
  public function createChild() {
    return new Child();
  }
}
 

Re: Publish site (move from local to remote)

Posted: Mon May 05, 2008 9:54 am
by Todlerone
Can I use

Code: Select all

break;
somewhere in the code, it's getting to expensive.
LOL

Re: Publish site (move from local to remote)

Posted: Mon May 05, 2008 10:47 am
by RobertGonzalez
Nerds! The lot of you.

Though those are some awesome snippets. My creativity is in the toilet right now so I have nothing to offer except:

Code: Select all

<?php
$bedTime = new ChildFactory();
 
while ($everah->wife->isHot() && !$everah->snipped) {
    $bedTime->createChild();
}
?>

Re: Publish site (move from local to remote)

Posted: Mon May 05, 2008 10:50 am
by Todlerone
Again, I'm new to coding. Could I use a widget here and if so where would I stick it, I mean place it...lol