Sublime Text Preview php files on localhost

5,577

this tutorial is for ubuntu, in your SO the path maybe are no the same

right click in any file go to project-> Edit Project Preview Url

add this line:

{
    "/home/user/Webs/your-site":   //path from your project
    {
        "url_testing": "http://localhost/your-site/",
        "url_production": "http://www.your-site.dev"
    }
}

(use absolute path, not the relative from project that you get from copy path)

Share:
5,577

Related videos on Youtube

adamhuxtable
Author by

adamhuxtable

Updated on September 18, 2022

Comments

  • adamhuxtable
    adamhuxtable over 1 year

    Hey I've just started using Sublime Text 2 with the SidebarEnhancements package installed.

    I have it setup so that when I press the build shortcut it previews in Chrome which is fine for my HTML files. I have apache setup on my machine and works fine when I type it in the browser.

    What I was wondering was is there a way to when I build the page for it to open within the local host.

    I have all my websites in the Sites folder and is the default location for apache.

    I'm running the latest version of Sublime Text 2 on an iMac.

    • fiordiconio
      fiordiconio over 11 years
      Kinda off topic, but I found this yesterday and wanted to share it: PHP Built in Web Server