﻿1
00:00:00,000 --> 00:00:04,000
Once you've completed and tested your 
PHP-based site on your local computer, you


2
00:00:04,000 --> 00:00:07,000
can deploy it to your remote site.


3
00:00:07,000 --> 00:00:11,000
I'll start by showing you how to 
configure the remote site, and how to set it up


4
00:00:11,000 --> 00:00:15,000
to work with the remote site 
over FTP, or File Transfer Protocol.


5
00:00:15,000 --> 00:00:20,000
For the purpose of this demonstration, 
I'm using an FTP server called FileZilla.


6
00:00:20,000 --> 00:00:25,000
It's a Windows-based, free FTP server 
which you can get from the web, and it's


7
00:00:25,000 --> 00:00:28,000
very easy to set up and install.


8
00:00:28,000 --> 00:00:31,000
I've configured a single user on the server.


9
00:00:31,000 --> 00:00:37,000
The name of the user is ftpuser, and 
I'll show you that under Shared folders,


10
00:00:37,000 --> 00:00:41,000
it's pointing to a folder 
named remote, under my web root.


11
00:00:41,000 --> 00:00:44,000
So for demonstration purposes, I'm 
working with the same installation of


12
00:00:44,000 --> 00:00:50,000
Apache, MySQL, and PHP, as I am for 
my local server, but I'm pointing to a


13
00:00:50,000 --> 00:00:52,000
different directory.


14
00:00:52,000 --> 00:00:56,000
I'll close the User 
configurationscreen in FileZilla and then minimize it


15
00:00:56,000 --> 00:00:58,000
to keep it running.


16
00:00:58,000 --> 00:01:02,000
Now, if you're working on Mac OS X, 
you can instead use the FTP capability


17
00:01:02,000 --> 00:01:05,000
that's built into that operating system.


18
00:01:05,000 --> 00:01:10,000
Go into your System Preferences, to 
Sharing, to File Sharing, and then under


19
00:01:10,000 --> 00:01:13,000
Options, you'll be able to 
turn on the FTP capability.


20
00:01:13,000 --> 00:01:18,000
Or if you'd like to apply these 
skills to an actual remote site, just get


21
00:01:18,000 --> 00:01:24,000
the FTP credentials from your Internet 
Service Provider, or your web server administrator.


22
00:01:24,000 --> 00:01:29,000
I'm working with a site named 09_deployremote.


23
00:01:29,000 --> 00:01:35,000
I'll go to the menu and choose Site > 
Manage Sites, and then click Edit to look


24
00:01:35,000 --> 00:01:38,000
at the Site preferences.


25
00:01:38,000 --> 00:01:41,000
I'll go to the Servers category on the left.


26
00:01:41,000 --> 00:01:46,000
When I first configured the site, I 
created a local server definition.


27
00:01:46,000 --> 00:01:50,000
Now I'm going to add a new server 
definition for the remote server.


28
00:01:50,000 --> 00:01:54,000
I'll click plus, and I'll 
name this Remote Server.


29
00:01:54,000 --> 00:01:58,000
You can connect using a variety of 
protocols, but almost all the time you're


30
00:01:58,000 --> 00:02:02,000
going to use FTP, or File Transfer Protocol.


31
00:02:02,000 --> 00:02:08,000
The FTP Address can either be the DNS 
name or the IP address of your remote server.


32
00:02:08,000 --> 00:02:14,000
I'm going to use the IP address, 127.0.0.1.


33
00:02:14,000 --> 00:02:21,000
Then I'll type in my username, ftpuser, and the 
password that I created with it. Then I'll test.


34
00:02:21,000 --> 00:02:27,000
If your FTP server is running, you 
should connect to your server automatically.


35
00:02:27,000 --> 00:02:31,000
If you have any troubles, the first 
thing to try is to go into More Options and


36
00:02:31,000 --> 00:02:36,000
try selecting Use Passive FTP,
and then click Test again.


37
00:02:36,000 --> 00:02:41,000
If you're still having trouble, check 
Adobe's web site. Go to the Dreamweaver


38
00:02:41,000 --> 00:02:46,000
Support site, and type in connecting 
with FTP, and you'll find a knowledge-based


39
00:02:46,000 --> 00:02:48,000
article that should help.


40
00:02:48,000 --> 00:02:52,000
My username is already connected to 
the correct directory, so I don't need to


41
00:02:52,000 --> 00:02:55,000
put any information here under Root Directory.


42
00:02:55,000 --> 00:03:01,000
I'm also setting the web URL to point 
to the remote folder under the localhost.


43
00:03:01,000 --> 00:03:05,000
For a remote FTP server, you won't 
use this value, but it's a good idea to


44
00:03:05,000 --> 00:03:06,000
have it be accurate.


45
00:03:06,000 --> 00:03:11,000
Then I'll click Advanced, and I'll 
check to make sure that I have this option,


46
00:03:11,000 --> 00:03:14,000
Maintain synchronization information, selected.


47
00:03:14,000 --> 00:03:20,000
This will allow me to easily synchronize my 
files between the client and the remote site.


48
00:03:20,000 --> 00:03:27,000
And as with the testing server, 
I'll set the Server model to PHP MySQL.


49
00:03:27,000 --> 00:03:29,000
I'm not going to turn on the other options.


50
00:03:29,000 --> 00:03:34,000
This one, Automatically upload files to 
server on Save, will cause all changes


51
00:03:34,000 --> 00:03:37,000
to be uploaded immediately upon saving them.


52
00:03:37,000 --> 00:03:39,000
I typically don't like to do that.


53
00:03:39,000 --> 00:03:42,000
You can, if you like, use 
the file checkout capability.


54
00:03:42,000 --> 00:03:47,000
This results in placing file locks on 
files on your remote server, so that only


55
00:03:47,000 --> 00:03:51,000
one user can check them out at a time.


56
00:03:51,000 --> 00:03:55,000
I'll click Save, and then I'll check to 
make sure that my new server is marked as


57
00:03:55,000 --> 00:04:00,000
the remote server and not as the 
resting server, and I'll click Save.


58
00:04:00,000 --> 00:04:05,000
Then I'll click Done, and 
I'll go to my Files panel.


59
00:04:05,000 --> 00:04:08,000
Right now, I'm looking at the Local View,


60
00:04:08,000 --> 00:04:12,000
that is the set of files that I've 
been managing through Dreamweaver already.


61
00:04:12,000 --> 00:04:17,000
I'll switch to the remote server and 
show you that that folder is empty, and


62
00:04:17,000 --> 00:04:21,000
I'll show you the physical folder 
on the server, which on Windows is


63
00:04:21,000 --> 00:04:29,000
wamp/www/remote, and show that it's 
starting off as an empty file also.


64
00:04:29,000 --> 00:04:33,000
If this folder doesn't already exist on 
your local computer, you should create


65
00:04:33,000 --> 00:04:37,000
it now, and then you'll be ready to 
upload files to your server and synchronize


66
00:04:37,000
the files between the client and the 
remote server whenever you need to.





