Publish site (move from local to remote)

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Publish site (move from local to remote)

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Publish site (move from local to remote)

Post 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 :)
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Publish site (move from local to remote)

Post 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
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Publish site (move from local to remote)

Post 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.
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Publish site (move from local to remote)

Post 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.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Publish site (move from local to remote)

Post 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
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Publish site (move from local to remote)

Post 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.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Publish site (move from local to remote)

Post 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.
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Publish site (move from local to remote)

Post 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
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Publish site (move from local to remote)

Post 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>
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: Publish site (move from local to remote)

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Publish site (move from local to remote)

Post 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();
  }
}
 
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Publish site (move from local to remote)

Post by Todlerone »

Can I use

Code: Select all

break;
somewhere in the code, it's getting to expensive.
LOL
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Publish site (move from local to remote)

Post 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();
}
?>
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Publish site (move from local to remote)

Post 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
Post Reply