Using Brackets with PHP Project

Brackets is a modern code editor developed by Adobe. When it comes to these lightweight editors, PHP support is a must. This post will introduce some settings to make coding a PHP project with Brackets a better experience. 


When you start a project which contains php files, you will see this error, “To launch live preview with a server-side file, you need to specify a Base URL for this project”. This means you need a web server to run this project.

Most developers use one of these 2 suites. Both are fine.

Open/Start a Project

On menu, choose Files > Open  Folder... or press Ctrl + Alt + O.  You then browse to root folder of your project.

In Live Preview, when Brackets asks for the url, type the location of your project like http://localhost/testproject.

Associate an extension with PHP

Files like .inc are used a lot so they should be treated like .php files.  To do this, open an .inc file and click the drop-down in the lower-right, which shows “Text” by default. choose PHP, then open the drop-down again and choose “Set as Default for .inc Files.”

Best Brackets Extensions for PHP

  • PHP Syntax Hint: help you a lot in writing php SYNTAX, MYSQL Queries as this will auto-suggest Syntax.
  • PHP SmartHints: it provides code hints for PHP files including PHP keywords, built-in functions, constants and variables. It also provides hinting for variables created in the current open PHP document.
  • PHP Code Quality Tools: analyze and lint PHP using several code analysis tools.
  • PHP Debugger: eables full PHP debugging using xdebug.



Leave a Reply

Your email address will not be published. Required fields are marked *