How to Set up a PHP/MySQL Site in Dreamweaver

Set up a dynamic PHP website in Adobe Dreamweaver

Setting up a new site in Dreamweaver is quite simple — just follow the step-by-step instructions below. If you are using Dreamweaver CS3 or Dreamweaver 8, you can start the New Site wizard right from the "Site" menu.

How to Set up a New Site in Dreamweaver

  1. First off, you'll need to name your site, and put in its URL. When you get to Step 3, choose Yes, I want to use a server technology. Then choose PHP MySQL as your server technology.

    Yes, I want to use server technology
  2. The most difficult part of working with dynamic, database-driven sites is testing. In order to make sure that your site is working correctly, you need to have a way to do both the design of the site and manage the dynamic content that comes from the database. It doesn't do you a lot of good if you build a beautiful product page that won't connect to the database to get the product information.

    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 a local network  If your desktop is networked to the web server, you can use this option to connect to the server.

    Editing and testing locally are preferable, as it's faster and lets you get more work done before pushing the files live.

  3. Because you'll be testing your site on your local computer, you'll need to tell Dreamweaver what the URL is to that site. This is different from the final location of your files — it is the URL of your desktop. http://localhost/ should work correctly — but be sure to test the URL before you press Next.

    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, if you place your site in the "myDynamicSite" directory on your web server, you'll use the same directory name on your local machine.

  4. Once you've defined your site location, Dreamweaver will ask you if you will be posting the contents to another machine. Unless your desktop also doubles as your web server, you will need to choose Yes, I want to use a remote server. Then you'll be asked to set up the connection to that remote server. Dreamweaver can connect to remote servers by FTP, local network, WebDAV, RDS, and Microsoft Visual SourceSafe. 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.

    Dreamweaver will also post your files live

    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, but it's not necessary to use this unless you're working on a project with a web team.

  5. Review the settings in the Site Definition Summary, and if they are all correct, press Done. Dreamweaver will then create your new site.

    You're Done!
Format
mla apa chicago
Your Citation
Kyrnin, Jennifer. "How to Set up a PHP/MySQL Site in Dreamweaver." ThoughtCo, Jul. 31, 2021, thoughtco.com/set-up-phpmysql-site-in-dreamweaver-3467219. Kyrnin, Jennifer. (2021, July 31). How to Set up a PHP/MySQL Site in Dreamweaver. Retrieved from https://www.thoughtco.com/set-up-phpmysql-site-in-dreamweaver-3467219 Kyrnin, Jennifer. "How to Set up a PHP/MySQL Site in Dreamweaver." ThoughtCo. https://www.thoughtco.com/set-up-phpmysql-site-in-dreamweaver-3467219 (accessed April 16, 2024).