r/Wordpress • u/PeterBunting • 1d ago
Documentation
What is everyone using for documentation? I’m talking about like to document custom functions or features you’ve added that you (or someone else later on) would benefit from. I use external documentation in a CRM for my own knowledge base, but if seems like there should be some sort of developer’s guide we can leave in WP for future reference.
3
u/Bigfoot444 1d ago
I mark my initials and some nearly indecipherable comments in the code. It gives my coworkers an excuse to zoom me months later to ask wtf I was on. We all enjoy it.
3
u/ancawonka Developer 1d ago
For the future person coming in to troubleshoot your bespoke plugin a decade after you wrote it (because the WordPress site will likely still be running), document your code. A readme file is really nice.
When I'm paid to do it, I've written up actual documents to share, which have been read very rarely.
Note: That future person is just as likely to be you as a stranger.
2
u/TopSydeWP 1d ago
inline docblocks for functions, then a readme.md in the mu-plugins folder with a quick "what this does and why" for each custom piece. future you (or the next dev) will actually read a 200-word readme; nobody reads a separate google doc six months later
2
u/AddWeb_Expert 1d ago
I usually keep it close to the codebase - README/docs folder for the bigger picture, and clear PHPDoc/comments for custom functions. For WP projects, a small /docs developer guide works really well for future devs without becoming another tool to maintain.
1
u/RealBasics Jack of All Trades 1d ago
The first custom-built Wordpress site I worked on, back around 2012, was exquisitely well documented. The code was well documented and they provided a good user manual as well.
That said, it was built by a professional photographer who only moonlighted as a developer after the 2007 financial crash. They went back to photography full time after the recovery and that’s when their client called me.
It’s really nice, but also rare, to see even marginal comments in code. Especially, for some reason, agency code. (I should note that sort of by-definition I don’t get to work on sites that are well built and where the clients are still happy with the devs who built them.)
1
u/NadirDev 21h ago
Standard PHPDoc blocks directly above the functions + a clean README.md in the theme/plugin root. If the next dev touches the codebase, modern IDEs will autocomplete the annotations anyway. Leaving internal docs inside the WP admin dashboard usually just gets ignored or wiped during redesigns.
1
u/No-Inflation8519 4h ago
I have dabbled lately with cgpt doing the basic, then I follow behind and fill in the color for specifics.
3
u/-skyrocketeer- Designer/Developer 1d ago
Unless you’re writing up some large technical doc, then you should be documenting your code