Once you've developed your sight locally to make it available to your users you need to put it life
onto a server that's accessible on the Internet putting your cold life basically involves copying all
this code to a production web server along with the database.
Let's look at an example.
I've got a live site here that's currently empty.
We'll deploy our current code base to this site we'll start by creating the database on the production
server.
First we need to export the structure and data of the current local database.
So in PE HP my admin on local host will start by clicking export change the method to custom.
We want all the table structures but only the data for categories and users.
You can export data for the articles if you like but I want to start with an empty blog on the life
server.
We want to view the output as text.
We don't need comments on a transaction.
Are the aalto increment option and the rest of the options will accept the defaults.
When I click go we get lots of esky well far creating tables inserting data and so on.
Let's copy all of this up and then on the live web server.
I've already got an empty database set up.
If I click on s q L..
And then paste in the code we just copied from the local database.
When I run this.
It creates the database and inserts the data on the life server.
And here we have the tables and the data for the tables that we exported data from.
Copying and pasting.
ESKEW L is one way to do this.
You can also export this Eskew L2 a file and then import this file.
If you prefer.
Now that we've put the database live next we need to copy the code alive.
The easiest way to do this is to use F T P for this.
You'll need an F T P client and I recommend file ziller which is free open source and available on all
platforms.
You'll also of course need EFT P access to your life server.
In files over here on the left we have the local files and this is the latest version of our code on
the right.
We have the live server which is currently empty.
Let's start by selecting all the local files and copying them across to the live server.
This will take a few moments.
How long depends on how much data you're transferring.
The speed of the connection and so on.
Once all the files are transferred there's one more thing to do before we can access our site and that's
to edit the config file.
We can do this directly into files either by right clicking the config dumpy HP file on the remote server
and selecting view edit.
In here we need to enter the details of the live database server and mail server and also change the
show area detail setting to falls when we save and close this file.
The file on the remote server is updated.
Let's take a look at the life site.
Here it is with no articles as we didn't transfer those.
But we can log in and add a new article.
If we give it a publish date then this article appears on the home page.
As we make changes to the code we can upload the updated files to the life server replacing the old
ones.
Make sure though that you don't overwrite the config file on the remote server are the uploads folder
either as the upload folder will contain any files uploaded to the lives server only.
Using F T P is the simplest way to put your site live.
There's also a protocol called S sgp that can be used in a similar way.
I'll be it from the command line.
There are many ways to put a site leive are deploying it from doing it are to magically when you store
your code in a source code control repository like get hold of advanced tools like deployer and fink's
for databases.