Adobe Dreamweaver CS5.5 sports some very exciting visual tools you can’t use with most sites unless you point it to a testing (or: staging) server. Unfortunately, many users struggle with nondescript error messages and frustrating demands of the app. While it works for some sites, it seems there is nothing you can do to make it work for others. Well, you can. Today we debunk the myths.
An update to this post explains How to Set Up Adobe Dreamweaver for Uploads to Amazon AWS EC2 without an FTP Account.
1. Set up your testing server
The simplest way to set up a testing server for Adobe Dreamweaver is by using a popular distribution such as:
– WAMP
– XAMP
– MAMP (for the Mac)
After the installation, you should create your database manually, for example using phpMyAdmin. If you intend to work on a project where a database already exists, you can simply import all existing data into a database of the same name on your testing server.
2. Download the CMS of your choice
Pick a CMS/blog and stick with it. The most popular ones are also the best documented and the best supported. Examples include:
– WordPress
– Drupal
– Joomla
Download the CMS of your choice directly from the project website, unzip the archive and copy the files to the document directory of your testing server.
3. Create a site in Dreamweaver
In Dreamweaver, create a new site and assign it the documents directory of your testing server as its local directory. It’s as simple as that.
4. Assign a testing server to your site
In the setup dialog for your new site, you need to assign it your WAMP/XAMP/MAMP as a testing server. Assuming that your newly configured testing server is running on your local machine, select a local connection and point Dreamweaver to the documents directory of your testing server. For example, for MAMP:
/Applications/MAMP/htdocs
with the corresponding web address:
http://localhost2:8888/
Remember to activate the newly configured server as a testing server in Dreamweaver by checking the appropriate option in your servers list for the site.
If you were to open the index file of your new site in Dreamweaver right now, it would ask you for permission to discover dynamically linked documents and then it would tell you that a server error was preventing this from happening. Far too many users get stuck here. What you need to do is go back to your testing server and configure your CMS.
5. Configure your CMS on the testing sever
Every CMS has its own procedures for setting up the database connection; you can usually find a description of how to do this in some sort of readme file in the documents folder of your site (for WordPress it’s readme.html). It will usually tell you to open yet another file in your web browser. The bottom line is this: you need a configuration wile which you can either create manually or let a script guide you through it. In order to execute the script, you need to navigate to it using the address of your test server (File > Open won’t do the trick), for WordPress for example:
http://localhost:8888/wp-admin/install.php
The configuration script will ask you for these things:
– database name: it’s easy, you make it up (if you already have a database on your publish server, use the same name)
– database username: you will find this information in the admin frontend of your testing server;
– database password: you will find this information in the admin frontend of your testing server;
– database host: this is the name of the host which runs your database, you will find this information in the admin frontend of your testing server;
– table prefix: if you want to run more than one CMS installation in a single database, you need this.
The setup script will want to run a full installation on your database, create tables and fill them with dummy entries. Follow the onscreen instructions.
Once this is complete, you should see your bare-bones CMS running happily on your testing server. Now is the time to transfer your data from any live server you might have onto your testing server.
6. Clone the database from your live server onto the testing server
Export the database on your live server and import the resulting file on your testing server. This will fill it up with all the entries you need for a simulation of your live conditions on your testing server. However, you must also make a few adjustments to prevent unwanted redirections. For WordPress, you can either edit the option_name home and siteurl in wp_options to match your testing server’s address, or enter these to lines:
define('WP_SITEURL','http://localhost'); define('WP_HOME','http://localhost');
in the wp-config.php file in order to overwrite database settings. If you are running your web server on any other port except the standard port 80, you need to specify the port number so the above modification looks like this:
define('WP_SITEURL','http://localhost:8888'); define('WP_HOME','http://localhost:8888');
If your WordPress installation is located in a subdirectory, you must append its name to the above address and so what you get looks like this:
define('WP_SITEURL','http://localhost:8888/direcrory/'); define('WP_HOME','http://localhost:8888/direcrory/');
7. Transfer data from your live server onto the testing server
Not all data on your testing server are necessarily in the database. You will need to transfer those files manually.
Now you are finally good to go!
Leave a Reply