r/PHPhelp • u/anagandi • Nov 23 '25
Solved PHP editor with internal live preview
Hello from a newbie. I hope this is the right place for my question.
I own a bunch of “old school” hobby sites built on very basic CSS, HTML and PHP-Include — I code the main design with CSS and HTML and then use the PHP Include function to create the site pages’ files. Until now, to preview these pages’ files during editing, I’ve used an editor called EditPlus as it allows me to view them locally on my laptop (I open the .php file inside EditPlus, click “Preview” and the program previews it internally without opening an external browser, the same way it would with an .html one). Does anyone know of a free code or text editor (or some plugin of a free editor) that lets you preview .php files like that? I already tried several free editors and IDEs, but none of them had this feature or a plugin for it (or if they had it I missed it). I could stick with EditPlus, sure, but the program is paid and while not super expensive having to pay for every new version is starting to add up.
I was almost forgetting to add: because of another editor I use that requires it, I have an old PHP version (the last version who came with an actual installer) installed on my laptop.
UPDATE = Please stop suggesting me to install a web server ((having never used one I’m not familiar with it and my laptop is not very powerful)) and/or to use the terminal + web browser combo ((why should I use that when the program does it for me and I don’t even need to open another browser to view the file?)) or other similar methods. I asked for a free alternative program (with a .php file preview tool like EditPlus’), not for an alternative preview method.
11
u/colshrapnel Nov 23 '25
Yes, the place is right, you're welcome to ask.
Just to let you know, using editors is a very unusual way of previewing PHP sites. A more accepted method is to have a web-server run locally, the site opened in a browser and then just pressing F5 will have your site reloaded.
The best part is that you aren't limited by the editor and can use any.
So, given you already have PHP installed, you can just open CMD console, cd to the project's directory and type
php -S localhost:80which should start the internal PHP's web server. Then you can navigate to http://localhost/ in your favorite browser and behold your site in the full glory.That's what I did personally when used Windows.
3
u/PickerPilgrim Nov 23 '25
Sounds like your old editor had a built in PHP environment. Not sure of any current tools that do that out of the box. Personally I use Docker to spin up local PHP environments. Some people still use WAMP/MAMP, which seems inadequate to me but might work for what you’re doing.
But, after a quick search I did find this VSCode extension which might do something like what you’re looking for: https://marketplace.visualstudio.com/items?itemName=t-myk.php-enabled-live-local-server
1
u/A35G_it Nov 23 '25
You can try Phoenix Code, it should do the trick for you
1
u/arhimedosin Nov 23 '25
EditPlus is my editor of choice for more then 20 years.
And if you pay once for license, you have it for good https://www.editplus.com/register.html
1
u/Anxious-Insurance-91 Nov 23 '25
Sooo what you need is the PHP mobile server? I think you can run it from the terminal
1
u/mulquin Nov 24 '25 edited Nov 24 '25
The VSCode "Live Server" extension looks like it does what you want: https://open-vsx.org/extension/ritwickdey/LiveServer. You're asking for some very specific requirements to do things in way that is different than how most people do things, so you're not going to find more than EditPlus that does every single thing you want.
It looks like Microsoft are developing an extension that has the webview integrated in the IDE: https://github.com/microsoft/vscode-livepreview but unfortunately it does not interpret PHP files.
I think you're going to have to suck it up and run the PHP file in a web browser alongside your IDE or keep paying for EditPlus.
1
u/SnakeRiverWeb Nov 24 '25
I use https://www.ampps.com/ for local php, install on windows or macos, easy to use and free, then you can edit your code with any thing ide you like.
1
u/GrouchyInformation88 Nov 25 '25
I spent years avoiding to do things similar to what you seem to be avoiding. Maybe im wrong, if that’s the case then please disregard this message.
It always felt so complicated when someone mentioned servers or terminals and I thought to myself that was just for “real” developers. But in reality it’s a lot simpler than what you are trying to do. And since you seem to be intelligent enough to teach yourself to code, you can probably also do this pretty quickly and it will save you so much time.
Anyway, best of luck to you.