Skip to main content

PHP Live Preview Setup

This page covers running PHP pages in the Live Preview. For PHP editing features like completions and error checking, see PHP Code Intelligence.

Setting up Live Preview for PHP projects is straightforward with Apache and XAMPP. Below are the installation and configuration steps for each operating system:

Steps for Windows

  1. Download and install XAMPP from Apache Friends.
  2. Open the XAMPP Control Panel.
  3. Modify the httpd.conf file located at C:\xampp\apache\conf\httpd.conf:
    DocumentRoot "C:/path/to/your/project"
    <Directory "C:/path/to/your/project">
    </Directory>
  4. Save the updated configuration.
  5. Restart the Apache server through the XAMPP Control Panel.
  1. Add the following settings to your custom Live Preview: Custom Live Preview Settings Your Live Preview should now automatically update to reflect changes whenever PHP files are edited.

PHP Live Preview in Action