Jump to content

A couple ProcessWire installations that get special treatment


Recommended Posts

I've been using ProcessWire for a long long time and over the years my techniques and go-to approaches have been constantly refined.  A lot of this knowledge is codified in my internal heavily opinionated starter module that sets up everything up the way I like.

Even with that, there are other tips, techniques, and modules that I may use occasionally on client sites and because of that, I may not remember them months or years later.  I do have a document that I've been better at updating recently with this information, but in addition to that, I think to really remember a piece of knowledge it's best to actively use it even if not necessary.

The best place I've found to do this is on my personal website.  I treat my personal website as a semi-testing ground, a reminder of techniques and the generally the first place I will use something that maybe gets used on my other client websites.  Even if I don't really need some specific module, need that odd hook, or require a specific setting, I will deliberately use it on my personal website because I have total control over it, it's live (meaning I have both a development and production version which allows me to test my deploy and sync scripts) and if something breaks temporarily it's not a big deal.

For example, I'm doing the following on my personal site:

  • various hooks that modify the admin; adding custom markup fields in the page editor for certain templates
  • using dotenv (maybe eventually use this everywhere, but only here for now to codify the latest approach on this)
  • using rockshell with some custom commands that I don't really need
  • have a random snippet for tracydebugger in /site/templates/TracyDebugger/snippets/
  • created all the other special status files in /site/ (boot.php, download.php, failed.php, render.php)
  • blocking the vendor folder in .htaccess
  • have a random rewrite rule in .htaccess
  • using ProcessRedirects with a random rewrite rule
  • disabling sessions
  • purposely have a dash in the name of my database (did you know Microsoft purposely put a space in the "Program Files" directory so that developers properly handle paths with spaces in it?)
  • using Page Edit Lock Fields on my home and about page (yea, locking the page from myself!)
  • experimenting with the AdminBar module and hooks, even though I won't use this module (I have my own admin bar that loads via ajax)
  • overriding styles in the ProcessWire's admin bar (making the font small, smaller spacing, full width container)
  • have a humans.txt file
  • separately, using Matomo even though I don't really care about analytics for this site
  • my deploy script deploys some extra random directories even though I don't need them
  • have a separate user account that's been assigned the AdminThemeBootstrap theme I am working on
  • using a honeypot field on my formbuilder-based contact form (I use this everywhere)

I have a note (which is basically the above list) that I add to so it's easy to remember what I did, why and references to it (forum post, github, blog post, etc.).

---

Separately, I have another completely blank ProcessWire installation with nothing extra done to it (except TracyDebugger).  I use this to test and experiment various things (sometimes unrelated issues) when I don't want any hooks or installed modules potentially modifying anything.  I'll also install modules here that I'm not so sure about.  If I suspect I hit a bug with ProcessWire in a separate installation, I'll experiment here as well.  Once I'm done fully experimenting and the issue has been resolved, I'll make a note in a log of what I did then undo my changes bringing it back to a clean slate.

  • Like 7
Link to comment
Share on other sites

6 hours ago, Jonathan Lahijani said:

created all the other special status files in /site/ (boot.php, download.php, failed.php, render.php)

Just wondering, have you (or anyone else) ever needed to put anything into those files? What scenarios are they useful in? I use status files for "init", "readySite" and "readyAdmin", and I think once or twice I've used "finished", but I don't have a grasp on what the files you mentioned would be useful for.

 

Link to comment
Share on other sites

On 5/10/2024 at 4:29 PM, Robin S said:

Just wondering, have you (or anyone else) ever needed to put anything into those files? What scenarios are they useful in? I use status files for "init", "readySite" and "readyAdmin", and I think once or twice I've used "finished", but I don't have a grasp on what the files you mentioned would be useful for.

@Robin S Not yet but at least for now, the files existing there serve as a visual reminder.

  • Like 1
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...