Open Studios

How to safely evolve compliance-critical WordPress platforms

Photo by Bonnie Kittle on Unsplash
Chesterton’s fence is the idea we should understand why something exists before changing it. The same principle applies when changing software.

Some WordPress sites are too important to change casually.

They might support client records, student assessments, internal reporting, sensitive private information, bookings, payments, or operational workflows where accuracy isn’t just important, it has compliance requirements.

In these environments, the challenge is not just efficiently delivering new features. The challenge is preserving and building trust. Both your client and their users need to trust that the system continues to work as it should. Data, calculations, reports – these can have legal consequences if the system is not working as expected.

At Open Studios, we help digital agencies and their clients make careful changes to complex WordPress and PHP systems that cannot afford to break.

Below are some key ingredients we’ve used to help people succeed in evolving these critical systems.


Keep the reference material close and integrate team knowledge into the code comments.

If regulations are available, make sure to reference them and even quote the relevant block. Link to online copies if they are available. This helps with team alignment and ensures that code is always written with the regulations in mind.

<?php
/**
 * Example comment above something compliance-related
 * 
 * This implements section 7.3.1 of the Standard Document.
 * @see https://example.com/standard-document#section-7.3.1
 */

When performing compliance-related calculations or using formulas, make sure to reference the actual math you’re supposed to implement and how it’s been interpreted into code. It’s usually best to isolate such calculations into their own functions or classes so they can be easily tested and maintained.

<?php
/**
 * Example formula translation above calculations
 * 
 * This implements section 7.3.2 of the Standard Document.
 * @see https://example.com/standard-document#section-7.3.2
 *
 * The formula from the standard is:
 *     Counted Hours = Actual Hours * (1 + (Months since late renewal / 20))
 */

function counted_hours( float $actual_hours, int $months_late ): float {
    return $actual_hours * ( 1 + ( $months_late / 20 ) );
}

If the client is unable to provide much technical documentation or reference material, it can be useful to produce your own. If it’s developer facing only and only relevant when working on the codebase, consider adding it directly to the repo as a /docs folder with Markdown files. Most git hosting platforms will automatically render Markdown files as HTML documentation.

Maintain internal documentation that bridges the gap between code and compliance requirements.

Many client domains use generic-sounding terms that actually have a specific meaning within compliance and regulatory frameworks. Whatever that terminology is, it can be vital to have a clear glossary for development teams so that ambiguity and incorrect assumptions can be avoided. Sometimes clients develop their own language on top of the framework. It’s important to document these too in order to communicate effectively.

Standard SKU: Refers to the lookup code that government agencies use to identify products and services.
Counted Hours: The number of hours after all calculations are performed including per record and account wide adjustments.
Regular Price: The market price of a product before we apply our own adjustments.
Product Price: The final price of a product after all adjustments have been applied.
Delivery Date: The requested date by the client for the product to be delivered.
Order Completed Date: The date the order was completed and the product was delivered.

Developing a WordPress site can take many different forms, with many different valid approaches. Maintaining an internal developer reference explaining the key fundamentals of how the system is put together, including how top-level concepts were translated from requirements into Custom Post Types, Taxonomies and Constants, can save a lot of time and effort in the long run.

<?php
/**
 * Standard Product CPT class file.
 * 
 * This class implements the Standard Product CPT that allows clients to manage prices and metadata without changing the live store.
 * 
 * Product information is synced to associated products on save.
 */

When the client system’s language is documented along with the system’s architecture, communication between developers and stakeholders can be more effective. The glossary provides the vocabulary while the accompanying notes like project history, architecture and assumptions provide the context.

When making changes to compliance-critical systems, having this information can be essential to ensure that changes required were understood and will be implemented correctly.

Use the client’s subject-matter expertise to test system accuracy including any calculations.

If a project happens to have a subject matter expert as a stakeholder, make good use of that person’s expertise and regularly maintain communication with them with progress updates and engage them for feedback.

People who have spent years working in their fields can provide valuable insights that can round out our understanding of requirements that are otherwise missed during discovery and development. Sometimes this can be as organic as asking them a series of questions probing theoretical design constraints; other times it may be a request for people to review exported data for accuracy.

We’ve spent a number of years working with a training organisation that provides courses and tracking software. Their organisation helps people obtain certifications so they are able to do their jobs. The training program itself is regulated by an Australian state government department. We helped them migrate from an old compliance scheme to a new one, and offered their existing users an option of migration, as permitted by the rules. This option was unique to our client’s platform. Their competitors opted to migrate everyone at once and not give the option.

Thanks to our technical steering of the project and maintaining open communication with the client, we were able to deliver the new compliance rules by the deadline with our client’s satisfaction that both the old and new rules were implemented correctly. The client was then audited by the state government and received positive feedback that they met the standard required.

Version the data model and write migrations

The shape of a system can change dramatically with time. Managing that evolution with code is handled well by version control systems like Git, but the mechanism for the database has to be implemented manually by developers.

Many clients that implement WordPress as a critical system will have customisations that implement custom fields, custom post types and taxonomies. These customisations are referenced in code and sometimes undergo changes over time. Just as WordPress itself sometimes requires a database update when the software is updated, so too does a custom WordPress implementation.

By versioning the database you develop an implementation reference in the code, as well as a project history of how the system’s data has changed over time. This can be as simple as a WP Option that stores the same version number as that of a custom plugin you’ve written. Then you just need to write a hook that runs the migration as needed i.e. if we’re on a newer version of the plugin than is stored in the WP Option.

Having this mechanism allows you to ensure clean migration of data on each deployed environment without manually updating data records in each environment. When helping clients who have custom meta keys and values that need to be migrated, we version the database and write migrations to ensure a consistent experience across all environments.

How dev processes help with recovery and rollback options

Clients whose business depends on a WordPress system cannot afford to test changes on their main site. By establishing a development environment, you can incrementally build and test changes without affecting others. When making use of a staging environment, you can test the changes and discuss them with the team before deployment. This is the point where client feedback, user acceptance testing and code reviews happen.

Best practices exist for a good reason, not necessarily because they’re the best possible solution but because they are widely accepted to deliver a result when weighing different constraints. Within web development, ensuring that websites are built using version control, and following best practices for development operations, can be vital to ensuring service level agreements are achieved within agreed standards.

At Open Studios we work with digital agencies that implement their own hosting and have strong standards that define things like issue tracking, deployment processes and operations. They are contractually obligated to their clients to deliver a high-quality service within agreed standards. In these situations we work within the client’s team and framework to ensure that the service level agreements are met and the client feels confident to entrust us with their critical systems.

Disaster recovery planning and having strong systems can be essential to ensuring continuity of a WordPress site when hackers try to exploit potential security vulnerabilities or unexpected problems arise from recent changes. Sometimes the problems arise due to incompatibilities between plugins or themes, or due to changes in WordPress itself needing to be accounted for in custom code.

Whatever the reason, it’s much easier to get a website back up and running if you have planned ahead for different possibilities. Version control lets you roll back to a previous version of your codebase if something goes wrong. Having regular database backups means you can recover lost records from a previous point in time if they were corrupted or deleted.


Evolving a critical system takes an understanding of the rules it implements, the people who depend on it and the consequences of getting it wrong. Clear documentation, close collaboration and careful development practices give everyone involved a stronger foundation for making changes with confidence.

At Open Studios, we bring this care to our work with digital agencies and their clients. The same level of care goes into every project we work on, whether it’s our own IP and R&D work or the projects we deliver alongside our agency partners.

About Paul Brzeski

Paul Brzeski is the Co-Founder and Technical Director of Open Studios, and a writer and creative technologist with more than two decades of experience working with software, the web, systems and graphical applications.

His work spans web development, technical architecture, WordPress and PHP systems, DevOps, interactive 3D and experimental R&D. He writes about technology, software, creative practice and the systems people build and live within.

Outside of work, Paul is a house husband, writer and dog dad to three fur babies.

Read more: Paul’s blog · LinkedIn

Selfie of Paul with his two doggos in the car

Back to Blog Home

Arrow sign saying this leads back