0

Edit .php file, save, upload via FireZilla, refresh page -> ~2 sec/change

While this is fairly quick, for certain edits like spacings, text & image alignments - it adds up. My site's hosted by DreamHost, and calls CSS, JavaScript, CDNs, and other externals.

All said, is there a faster way to see the results of an edit - say, an instant-render application?

  • Have you tried any HTML render application? I personally use Netbeans. Good for coding but not for designing. It has FTP build in so I just write code and right click my file and hit upload. I can add profiles to server settings to switch where to upload the file (different path or server). It has a built-in browser for local rendering and a plugin to connect to your local browser such as Google Chrome for debugging. When the plugin is enabled, the page refreshes whenever you save. Netbeans also has to refactor to change name across files + it has versioning integration e.g GIT and SVN. – Mohammed Joraid Mar 19 at 6:29
  • Dreamweaver once was a thing not sure anymore, has been years since I used it, please check it if you are not familiar with it already. I Tried the trial of PHPStorm once, I liked it it was very powerful. All functionality of NetBeans with smarter code completion and suggestion. It links classes in code across files and stuff. – Mohammed Joraid Mar 19 at 6:29
  • 1
    Please note this site is about recommending software, not assets or resources like howtos, manuals/tutorials, etc. If you're looking for software, please see What is required for a question to contain "enough information"? – Izzy Mar 19 at 6:54
  • Why not working locally with XAMPP and do the upload only when you finished your work? Working locally has many other advantages like debugging and you can't be faster than that. – martinstoeckli Apr 21 at 20:00
  • I am working locally, as shown in my answer – OverLordGoldDragon Apr 21 at 20:18
0

(0) Rewrite source code in HTML, eliminate all PHP
(1) Download AHK hotkeys
(2) Open notepad, paste, save as .ahk, run script on startup

^!s::
    ControlSend,,{F5},ahk_class MozillaWindowClass
    WinActivate, ahk_class MozillaWindowClass
return

Done. For each edit, [Ctrl]+[Alt]+S to refresh & focus on .html tab (or current tab). (custom hotkeys)
If referencing HTML w/ PHP, paste former, minified (unless needed readable) - and work with the rest.

Works near-instantly.


(If first time using AHK, insert in beginning)

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
0

If you have ssh access or upload via SFTP, you can work with the remote files "locally" by simply using sshfs to mount the remote file system. (Yes, there is sshfs for Windows). This eliminates the "switch to filezilla and upload" step.

Or set up a local VM that mirrors your production site config and run it locally. Or as I do, I run Linux on my desktop anyway so localhost does it all :)

For quick viewing of changes, set up a second machine next to you as a "instaviewer" with just a base OS and your target browser(s) and then use an extension like "Easy Auto Refresh" for Chrome to simply reload your page automatically every 3 seconds or so. https://chrome.google.com/webstore/detail/easy-auto-refresh/aabcgdmkeabbnleenpncegpcngjpnjkc

Should you see the need to inspect rendered HTML then you can switch to your browser on the dev machine and inspect.

  • Thanks for the suggestion, though my method's basically instant - worth trying for yourself, I'd say – OverLordGoldDragon Apr 21 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.