Version 12.1 by Agnease on 2026/05/26 10:35

Show last authors
1 {{velocity}}
2 #set ($discard = $xwiki.ssx.use('PublicWebSite.WebHome'))
3 {{html clean="false"}}
4
5 <section class="resource-header" aria-labelledby="hero-title">
6 <div class="container">
7 <div class="text-center">
8 <div class="hero-kicker">
9 <i class="fa fa-code" aria-hidden="true"></i>
10 XWiki custom development guidance
11 </div>
12 </div>
13
14 <h1 id="hero-title">Why XWiki custom development needs structure, documentation and upgrade awareness</h1>
15
16 <p class="resource-summary">
17 XWiki can be adapted to complex business needs. The important part is to keep custom work documented,
18 versioned and easy to validate during future upgrades.
19 </p>
20 </div>
21 </section>
22
23 <section class="resource-page">
24 <div class="container">
25 <div class="resource-layout">
26 <aside class="resource-sidebar" aria-label="Page summary">
27 <h4>In this guide</h4>
28 <ul>
29 <li><a href="#why-customize">Why customize XWiki</a></li>
30 <li><a href="#where-risk-appears">Where risk appears</a></li>
31 <li><a href="#safe-model">Safe model</a></li>
32 <li><a href="#upgrade-validation">Upgrade validation</a></li>
33 <li><a href="#practical-checklist">Checklist</a></li>
34 <li><a href="#strategic-advantage">Strategic advantage</a></li>
35 <li><a href="#custom-development-faq">FAQ</a></li>
36 </ul>
37 </aside>
38
39 <article class="resource-content">
40
41 <p>
42 Many organizations choose XWiki because it can grow beyond a simple documentation space. A platform may start
43 with pages, attachments and permissions, then evolve into structured applications, approval workflows, custom
44 dashboards, branded PDF exports, integrations or internal tools built around the company’s real processes.
45 </p>
46
47 <p>
48 This flexibility is valuable, but it also raises a legitimate concern: will custom development make upgrades
49 harder? The answer depends less on the existence of custom code and more on the way it is organized. A controlled
50 customization can remain stable for years. An undocumented change applied directly in production can become a
51 maintenance problem after the next upgrade.
52 </p>
53
54 <div class="resource-note">
55 <p>
56 <strong>In practice:</strong> XWiki custom development should be separated from standard platform pages,
57 documented, kept under source control, tested on staging and reviewed during upgrades. This makes custom
58 features easier to maintain instead of turning them into hidden dependencies.
59 </p>
60 </div>
61
62 <p>
63 XWiki custom development is the process of adapting the platform with custom pages, classes, objects, sheets,
64 templates, scripts, macros, UI extensions, Java components or integrations. The goal is to support real
65 business processes while keeping the instance understandable, maintainable and upgrade-aware.
66 </p>
67
68 <div class="resource-note">
69 <p>
70 <strong>The main point:</strong> custom code is not the problem. Uncontrolled custom code is. XWiki can be
71 customized safely when changes are separated from standard pages, tracked, documented and tested.
72 </p>
73 </div>
74
75 <h2 id="why-customize">Why XWiki custom development exists</h2>
76
77 <p>
78 Avoiding all customization may look safer at first, but it can create other costs. Users may start maintaining
79 side spreadsheets, sending approvals by email, duplicating data in external tools or bypassing the wiki because
80 it does not match their daily work. In these cases, a well-designed XWiki customization can simplify the process
81 and improve adoption.
82 </p>
83
84 <p>
85 Typical examples include custom metadata for documents, templates for recurring content, dashboards for teams,
86 approval flows, notifications, PDF layouts, page actions, UI extensions, macros and integrations with systems
87 such as authentication providers, ticketing tools, storage services, CRM platforms or AI assistants. These
88 features can be implemented at different levels, from wiki pages and scripts to packaged Java extensions.
89 </p>
90
91 <h2 id="where-risk-appears">Where customization becomes risky</h2>
92
93 <p>
94 Problems usually appear when nobody can quickly explain where a customization is implemented, why it exists or
95 how it should be tested. Business logic mixed into regular content pages, standard pages changed without notes,
96 scripts that exist only in production, hardcoded group names or missing upgrade checks are common signs that the
97 customization process needs more structure.
98 </p>
99
100 <p>
101 This is especially important in XWiki because custom logic can live in several places: classes, objects, sheets,
102 templates, Velocity or Groovy scripts, panels, UI extensions, macros, scheduled jobs and Java components. The
103 flexibility is useful, but each important customization should have a clear location and a clear maintenance
104 path.
105 </p>
106
107 <p>
108 Customizations should also be reviewed as part of the wider platform risk model. See
109 <a href="$xwiki.getURL('resources.xwiki-security-review')">what an XWiki security review should actually include</a>
110 for related checks around permissions, authentication, extensions, infrastructure and operational practices.
111 </p>
112
113 <h2 id="safe-model">A safer model for XWiki custom work</h2>
114
115 <h3>1. Keep custom code separate from standard XWiki pages</h3>
116 <p>
117 Custom classes, scripts, templates and configuration should usually live in dedicated technical spaces, for
118 example a company-specific <code>Code</code>, <code>Applications</code>, <code>Templates</code> or
119 <code>Config</code> area. This makes it easier to see what belongs to the standard distribution and what belongs
120 to the organization.
121 </p>
122
123 <h3>2. Document the purpose, not only the implementation</h3>
124 <p>
125 A short technical note is often enough: what the customization does, who uses it, where it is implemented, what
126 assumptions it makes and what should be checked after an upgrade. This turns custom work from a hidden script
127 into a maintainable part of the platform.
128 </p>
129
130 <h3>3. Keep custom code under source control</h3>
131 <p>
132 Custom development should not exist only inside the production wiki. Java code, scripts, XAR packages,
133 deployment files and templates should be stored in a source control system, such as Git. This gives the team a
134 history of what changed, when it changed and why.
135 </p>
136
137 <h3>4. Choose the right implementation level</h3>
138 <p>
139 Many useful features can start as wiki-based customizations using XWiki classes, sheets, templates, Velocity or
140 UI extensions. When a feature becomes complex, reusable or business-critical, packaging it as an extension is
141 often a better long-term option. Event listeners, custom services, scheduled jobs, integrations and advanced
142 workflow logic usually benefit from this approach.
143 </p>
144
145 <h3>5. Keep configuration outside the code</h3>
146 <p>
147 Group names, target spaces, template references, email recipients, external URLs and workflow settings should
148 not be hardcoded when they are likely to change. Configuration pages or preference objects make the feature
149 easier to adapt without rewriting the implementation.
150 </p>
151
152 <h2 id="upgrade-validation">Validate custom features during upgrades</h2>
153
154 <p>
155 A successful upgrade is not only one where XWiki starts and standard pages load. The upgrade plan should also
156 include the features that make the instance specific to the organization: custom dashboards, templates, macros,
157 workflows, permissions, notifications, PDF exports, scheduled jobs and integrations.
158 </p>
159
160 <p>
161 For each important customization, the team should know what to test and what a successful result looks like. A
162 staging environment or temporary clone is usually the safest place to run this validation before production is
163 touched.
164 </p>
165
166 <p>
167 For a broader upgrade preparation model, see
168 <a href="$xwiki.getURL('resources.why-upgrade-xwiki')">why regular XWiki upgrades matter</a>.
169 </p>
170
171 <div class="resource-note">
172 <p>
173 <strong>A practical rule:</strong> production can receive urgent fixes when necessary, but it should not become
174 the only place where the real version of a customization exists. After the emergency, the change should be
175 reviewed, documented and added to the normal maintenance process.
176 </p>
177 </div>
178
179 <h2 id="practical-checklist">XWiki custom development checklist</h2>
180
181 <p>
182 A maintainable XWiki customization should be easy to locate, explain, test and update. The following checklist
183 can be used as a starting point when reviewing existing custom work or planning a new feature.
184 </p>
185
186 <ul class="resource-checklist">
187 <li>Separate custom pages, scripts and configuration from standard XWiki content.</li>
188 <li>Document the business purpose, technical location and validation steps.</li>
189 <li>Keep custom code and important assets under source control, for example in Git.</li>
190 <li>Test custom features on staging before production upgrades.</li>
191 <li>Review old customizations and remove what is no longer used.</li>
192 </ul>
193
194 <h2 id="strategic-advantage">Custom code can become a strategic advantage</h2>
195
196 <p>
197 Many useful platform features start as custom development for one concrete need. A workflow, dashboard,
198 integration or structured application may first solve a private business problem, then become a reusable
199 internal component or even a public extension. This is how practical solutions often mature.
200 </p>
201
202 <p>
203 The goal is not to customize everything. The goal is to customize the right parts, in a way that can be
204 understood and maintained later. When custom work is separated, documented, versioned and tested, XWiki can stay
205 flexible without becoming fragile.
206 </p>
207
208 <h2 id="custom-development-faq">XWiki custom development FAQ</h2>
209
210 <h3>Does custom development make XWiki harder to upgrade?</h3>
211 <p>
212 Not automatically. Custom development becomes harder to upgrade when it is undocumented, mixed with regular
213 content, applied directly in production or missing from the upgrade validation plan. Well-organized custom work
214 can remain maintainable across upgrades.
215 </p>
216
217 <h3>Where should XWiki custom code be stored?</h3>
218 <p>
219 Custom wiki pages, scripts, templates and configuration should usually be kept in dedicated technical spaces.
220 Code and important assets should also be tracked in a source control system, such as Git, so changes are not
221 stored only in the production wiki.
222 </p>
223
224 <h3>When should an XWiki customization become an extension?</h3>
225 <p>
226 Packaging a customization as an extension is useful when the feature becomes complex, reusable, business-critical
227 or shared across multiple instances. Java components, event listeners, scheduled jobs and integrations often
228 benefit from an extension-based approach.
229 </p>
230
231 <h3>What should be tested after an XWiki upgrade?</h3>
232 <p>
233 Besides standard pages, the validation should include custom dashboards, templates, macros, workflows,
234 permissions, notifications, PDF exports, scheduled jobs, integrations and any custom applications used by the
235 organization.
236 </p>
237
238 <h3>Why should configuration be kept outside custom code?</h3>
239 <p>
240 Values such as group names, target spaces, external URLs, email recipients and workflow settings can change over
241 time. Keeping them in configuration pages or preference objects makes custom features easier to adapt without
242 changing the implementation.
243 </p>
244
245 <div class="resource-note">
246 <p>
247 Related resources:
248 <a href="$xwiki.getURL('resources.xwiki-security-review')">what an XWiki security review should actually include</a>
249 and
250 <a href="$xwiki.getURL('resources.why-upgrade-xwiki')">why regular XWiki upgrades matter</a>
251 </p>
252 </div>
253
254 <div class="resource-cta">
255 <h3>Need help reviewing XWiki customizations?</h3>
256 <p>
257 If your XWiki instance includes custom scripts, dashboards, workflows, templates, integrations or Java
258 extensions, a customization review can help identify what is safe, what needs documentation and what should be
259 tested before the next upgrade.
260 </p>
261 <a class="btn btn-primary" href="$xwiki.getURL('contact.WebHome')">Request a customization review</a>
262 </div>
263
264 </article>
265 </div>
266 </div>
267 </section>
268
269 <script type="application/ld+json">
270 {
271 "@context": "https://schema.org",
272 "@type": "FAQPage",
273 "mainEntity": [
274 {
275 "@type": "Question",
276 "name": "Does custom development make XWiki harder to upgrade?",
277 "acceptedAnswer": {
278 "@type": "Answer",
279 "text": "Not automatically. Custom development becomes harder to upgrade when it is undocumented, mixed with regular content, applied directly in production or missing from the upgrade validation plan. Well-organized custom work can remain maintainable across upgrades."
280 }
281 },
282 {
283 "@type": "Question",
284 "name": "Where should XWiki custom code be stored?",
285 "acceptedAnswer": {
286 "@type": "Answer",
287 "text": "Custom wiki pages, scripts, templates and configuration should usually be kept in dedicated technical spaces. Code and important assets should also be tracked in a source control system, such as Git, so changes are not stored only in the production wiki."
288 }
289 },
290 {
291 "@type": "Question",
292 "name": "When should an XWiki customization become an extension?",
293 "acceptedAnswer": {
294 "@type": "Answer",
295 "text": "Packaging a customization as an extension is useful when the feature becomes complex, reusable, business-critical or shared across multiple instances. Java components, event listeners, scheduled jobs and integrations often benefit from an extension-based approach."
296 }
297 },
298 {
299 "@type": "Question",
300 "name": "What should be tested after an XWiki upgrade?",
301 "acceptedAnswer": {
302 "@type": "Answer",
303 "text": "Besides standard pages, the validation should include custom dashboards, templates, macros, workflows, permissions, notifications, PDF exports, scheduled jobs, integrations and any custom applications used by the organization."
304 }
305 },
306 {
307 "@type": "Question",
308 "name": "Why should configuration be kept outside custom code?",
309 "acceptedAnswer": {
310 "@type": "Answer",
311 "text": "Values such as group names, target spaces, external URLs, email recipients and workflow settings can change over time. Keeping them in configuration pages or preference objects makes custom features easier to adapt without changing the implementation."
312 }
313 }
314 ]
315 }
316 </script>
317
318 {{/html}}
319 {{/velocity}}