How to Set Up a PHP/MySQL Site in Dreamweaver
Set up a New Site in Dreamweaver
If you are using Dreamweaver CS3 or Dreamweaver 8, you can start the New Site wizard right from the “Site” menu.
Name your site, and put in it’s URL. But at Step 3, choose “Yes, I want to use a server technology”. And choose PHP MySQL as your server technology.
How Will You Test Your Files?
Dreamweaver gives you three ways to set up your testing environment:
- Edit and test locally
To do this, you need to have a functional Web server with PHP and MySQL installed on your desktop. If you have Windows, you can use a package to install WAMP (Windows Apache, MySQL, and PHP) and there are also packages to install on Macintosh computers as well. This is the best choice to get immediate feedback on what you’re editing.
- Edit locally, then upload to a remote testing server
If you’re working with other designers, then chances are you’ll need to choose this option. When you need to check something dynamic on your site, you upload the pages to the testing server. You can also use the check-in and check-out features in Dreamweaver to keep from overwriting your co-workers’ work.
- Edit directly on a remote testing server using local network
If your desktop is networked to the Web server, you can use this option to connect to the server.
I prefer to edit and test locally – it’s faster and lets me get more work done before pushing the files live.
So, I will be storing the files for this site inside the DocumentRoot of my Apache Web server.
What is Your Testing Server URL
If you are placing your site in a folder on your Web server (rather than right at the root), you should use the same folder name on your local server as on the live server.
For example, I’m placing my site in the “myDynamicSite” directory on my Web server, so I will use the same directory name on my local machine:
Dreamweaver will also post your files live
To connect by FTP, you need to know the following:
- Hostname or FTP address
- Folder on the server to store the files
- FTP login username
- FTP login password
- Whether you should use Secure FTP or not
Contact your hosting provider if you don’t know what this information is for your host.
Be sure to test your connection to make sure Dreamweaver can connect to the remote host. Otherwise, you won’t be able to put your pages live. Also, if you’re putting up a site in a new folder, make sure that that folder exists on your Web host.
Dreamweaver offers check-in and check-out functionality. I don’t use this unless I’m working on a project with a Web team.