Django upgrades and rescue, without a rewrite.

We move ageing Python and Django codebases onto supported versions one release at a time, keeping the site live throughout.

03 Django upgrade & rescue

Upgrades & rescue

Move ageing Python and Django codebases onto supported versions without a rewrite. We untangle migrations, remove circular imports and add tests where they are missing, keeping the site live throughout.

Django 2.x / 3.x → 5.2 LTSPython 3.13pytest
What you get
Codebase audit with a risk-ranked upgrade plan
One release at a time, each shipped to production
Test coverage added around the riskiest code first
Dependency clean-up and security patching
Typical engagement4–14 weeks

Signs your Django app needs an upgrade

  • You are on a Django version that no longer gets security fixes. Django 3.2 lost support in April 2024 and Django 4.2 in April 2026.
  • Your Python version is end-of-life, so new libraries and security patches no longer install.
  • Key packages are pinned to old versions, or have been abandoned.
  • Developers avoid touching parts of the code because nothing tells them what might break.

How we upgrade without a rewrite

Rewrites are slow, expensive and risky. We upgrade the application you already have, one Django release at a time:

  1. Audit. We map the codebase, dependencies and deprecation warnings, and give you a risk-ranked upgrade plan.
  2. Safety net. We add tests around the riskiest code first: payments, permissions, data imports and anything customers rely on.
  3. One release at a time. Each step is upgraded, tested and shipped to production before the next, so the site stays live throughout.
  4. Clean-up. We replace abandoned packages, untangle migrations and circular imports, and patch security issues on the way.

Our Django 3.2 to 5.2 upgrade guide shows the path in detail.

Rescuing inherited projects

Some projects need more than an upgrade: a previous supplier has gone, there are no tests, deployments are manual and nobody is sure how it all fits together. We stabilise first, with monitoring, automated deployments and tests on the critical paths, and then move on to upgrades and new features.

How long an upgrade takes

Upgrades typically take 4–14 weeks, depending on the size of the codebase, how far behind it is and how much test coverage already exists. A two-week discovery sprint gives you the audit and a firm plan before any upgrade work starts.

Who it's for

This is for a team that already has a Django application in production and is afraid to touch it. The version is out of support, the person who wrote the migrations has left, or a security questionnaire has started asking awkward questions. You do not need a rewrite. You need the current system on a supported release, with the risky parts tested, and the site still taking orders while that happens.

The public write-up of this kind of work is the Django cost-reduction case study: a live UK SaaS platform, profiled and changed in place, rather than replaced. Upgrades follow the same rule. We change one release at a time and ship each step.

What you walk away with

You get a risk-ranked plan, then a codebase on Django 5.2 LTS, or as far along that path as the discovery said was sensible. Tests cover the paths that would hurt if they broke: login, payments, the nightly jobs, the import. Deployments become something a script does. The monitoring that was missing is in place before we call the rescue finished.

If the honest result is that one app should be retired instead of upgraded, that is the recommendation. We would rather write that down in week 4 than discover it in month four.

Timeline

Upgrades on this page are typically 4–14 weeks. A small, well-tested app is the short end. A large monolith with circular imports and no tests is the long end, because each release is shipped on its own. A two-week discovery covers the audit, the order of work, and a prototype of the riskiest step. Build cycles, if you continue, follow in four-week cycles.

The estimator, preset to an upgrade, asks how big the codebase is and gives a band. The discovery replaces that band with a plan.

PHP and legacy maintenance

Build it, or take it over

Some companies need a new PHP application. More of them have one already, and the person who built it has left. We do both.

  • New products in Laravel or custom PHP: accounts, payments, admin and the workflow your team actually uses.
  • Feature work on a live WordPress, Laravel or bespoke site, without a rewrite as the price of entry.
  • Takeover of an inherited codebase: where it runs, which version, what is untested, and what to change first.

The code goes in your repository. You can stop at the end of any cycle.

Security releases, shipped

On 21 October 2026 PHP published emergency fixes for two critical bugs, CVE-2026-109618 and CVE-2026-109619. An unpatched server can be taken over before your application code runs. The fixed releases are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 7.4, 8.0 and 8.1 have minimal source backports from the PHP security team, and some vendors ship a package. Anything older than 7.4 does not.

A firewall rule is a stopgap. We install the fixed release for the branch you are on, retest login, checkout, uploads and queues, and tell you if an extension will not survive the jump. If the honest answer is that your host can do this today, we say so.

Laravel, WordPress and the custom app from 2016

The framework is rarely the hard part. The hard part is the site that still takes orders.

  • Laravel for applications with real business rules, queues and an admin your staff can use.
  • WordPress when the editors are the point: themes, blocks and the plugins you actually need, kept updated.
  • Custom PHP that is too important to rewrite this quarter and too old to ignore. We patch it, put tests around the risky paths, and write down what a later rebuild would keep.

When PHP should become something else

If the application is on PHP 8.1 or older and every upgrade breaks it, another patch is not a strategy. We will say that before anyone signs a retainer. The usual next step is a Django rebuild that keeps the data and puts the old URLs behind redirects, or a rescue when the stack is already Python and only the version is the problem.

How an engagement starts

A healthy site on PHP 8.2 or newer is a short upgrade and a retest. A scattered estate, old hosting and nobody sure what is live, starts with a discovery sprint: an inventory, a patch order and a recommendation you can hand to your board. Monthly care comes after that, scoped to the sites we have actually seen.

Email [email protected] or send a brief with the output of php -v and whether the site is on the public internet. If you do not know the version, say that. We reply within one working day.

Who it's for

PHP stays a supporting service. The homepage is the Python studio. This page is for a company that already has Laravel, WordPress or a custom PHP application and needs it maintained, patched or extended by the same engineers who build in Python. We do not lead with PHP, and we do not pretend a public case study exists for it. The studies on Work are the Python products.

A healthy site on a supported release is a short upgrade and a retest. An estate nobody can draw on a whiteboard starts with discovery: an inventory and a patch order, covering weeks 0–4 including a first fix on the riskiest site. Anything built after that starts in week 5. Monthly care is priced only after we have seen the sites, so this page does not print a from-price for it.

Read the write-up Reducing server costs by 40% with Django optimisation: a case study.
Read the case study

Questions

Can we jump straight from Django 3.2 to 5.2?

Not safely in one step. We move through each feature release, 3.2 to 4.0, 4.1, 4.2, 5.0, 5.1 and 5.2, fixing deprecations at each stage. Each step is small enough to test and ship on its own.

Will the site go down during the upgrade?

No. Each step ships to production as a normal release, with tests and a rollback plan, so the site stays live throughout.

Do we need to upgrade Python as well?

Usually, yes. Newer Django versions need newer Python versions, so we plan both together and move Python at the point in the path where it causes least disruption.

What if our project has no tests?

That is common. We write tests around the riskiest code first, before changing anything, so each upgrade step has a safety net.

How long does a Django upgrade take?

Between 4 and 14 weeks for most projects. Small, well-tested apps are at the short end; large monoliths several versions behind take longer.