Tutorial: Configuring PHP preview

To be able to preview PHP files locally without uploading to web, you need to have a web server installed on your computer and it must be configured to support PHP files. Please refer to PHP and your web server manuals for more info on installing web server with PHP support.

We recommend to use the free Apache web server from apache.org

Step 1 - What is your document root?
Find out what is your local web server document root folder. The document root folder stores web page files available via your web server URL. Please refer to your web server manual for more info.

Step 2 - What is your web server address?
Find out what is your local web server URL, usually it is http://localhost/

Step 3 - Make sure your web server works
Verify that your web server really works with PHP files. To do this, save a PHP file to your web document root and try to open it via web browser. For example, if your web document root is c:\htdocs\, save your file as c:\htdocs\index.php and try to open it via URL http://localhost/index.php

If your web server works, you are now ready to configure the preview.

Step 4 - Configure preview
Now you must tell the editor software how to use your web server to display the PHP file preview.

  1. On the Options menu, click Preferences;
  2. In Preferences window, click Preview folder;
  3. Click Mappings, then click Add;
  4. Enter your document root folder and the corresponding web address, in the above example you would enter c:\htdocs\ and http://localhost/