EW Resource

Developing with PHP in Expression Web

See this overview on the MS Expression site

Previewing PHP pages

Expression Web installs with the Expression Development Server which the program users to enable you to preview PHP pages locally as you're working on your website. Here's more info from the Help topic "Preview a PHP Page":

With Expression Development Server, you can preview both ASP.NET pages and PHP pages locally. In order to preview a PHP page that you created in Microsoft Expression Web, you must also have PHP installed and configured on your computer.

To install PHP

  1. Download the zipped file that contains the PHP files from PHP.NET, and save the file to your computer.
  2. Open the zipped file by double-clicking it, and then click Extract all files.
  3. In the Extract Compressed (Zipped) Folders dialog box, click Browse.
  4. In the Select a destination dialog box, click Computer, and then click OS (C:). Click Make New Folder, and then name the new folder PHP. Click OK.
  5. In the Extract Compressed (Zipped) Folders dialog box, click Extract.
  6. Open the PHP folder. Locate and then make a copy of the "PHP.INI-recommended" file by right-clicking the file and clicking Copy, and then right-clicking inside the folder and clicking Paste.
  7. Rename the file named "PHP-Copy.INI-recommended" to "PHP.INI".

For more information on installing PHP, see Installation on Windows systems on PHP.NET.

To install PHP extensions

For best results, install only the extensions that you want to use. To install the extensions, remove comment marks from the extensions that you want to use in the PHP.INI file. For more information, see Installation of extensions on Windows on the PHP.NET website.

Note: For example, some commonly used extensions are: SMTP, MySQL, Pop3, Zlib, Zip, PDFLib, and Crack.

To use Expression Development Server to preview pages

  1. After you have installed PHP, in Microsoft Expression Web, on the Site menu, click Site Settings.
  2. In the Site Settings dialog box, on the Preview tab, select Use Microsoft Expression Development Server, and then select For only PHP and ASP.NET web pages.
  3. By default, Expression Web locates the php-cgi.exe file installed at C:\PHP or C:\Program Files\PHP. If you installed PHP in a different location, or if the text box under Path to PHP executable for previewing PHP pages in this website is empty, under Path to PHP executable for previewing PHP pages in this website, click Browse, locate and select php-cgi.exe, and then click OK.


You can install multiple versions of PHP, and then use the Path to PHP executable for previewing PHP pages in this website to select the version of PHP that you want to use to preview PHP pages. If you want to use this setting for this site only, select Use a PHP executable for this site only.

To use the current PHP setting as the default setting for all PHP sites other than the sites for which you have defined a custom PHP setting, do one of the following:

  • Select Use the PHP executable set in the Application Options, which will also set your global PHP options in the Application Options dialog box.
  • Click Tools, and then click Applications Options. In the Application Options dialog box, under Path to PHP executable for previewing PHP pages, click Browse, and then locate and select the version of php-cgi.exe that you want to use as the default for your PHP sites.