While Craft CMS is known for its seamless one-click updates, there are many scenarios where you might need to download a previous version of the software. Whether you are troubleshooting a bug introduced in a recent update, matching a local environment to a legacy production server, or performing a staged migration from Craft 2 to Craft 3, knowing how to access older builds is a critical skill for any developer.
In this guide, you will learn the official methods for retrieving older versions of Craft CMS across all major versions, from the modern GitHub-integrated releases of Craft 4 to the legacy zip files of Craft 2. We will also cover the essential steps for safely rolling back your installation without losing data.
Modern Craft CMS: GitHub Release Artifacts
For developers working on Craft 4 or the later iterations of Craft 3, the process of finding specific versions has become significantly more transparent. As of April 13th, 2023 (specifically starting with Craft 4.4.6 and Craft 3.8.7), the Craft CMS team began providing "starter" zip files directly as release artifacts on GitHub.
These artifacts are automatically generated for every release moving forward. This is the most reliable way to get a clean, pre-packaged version of the CMS if you prefer not to use Composer for the initial download.
Accessing GitHub Releases
- Navigate to the official Craft CMS GitHub Releases page.
- Scroll through the release history to find the specific version tag you need (e.g.,
4.4.7). - Expand the Assets section of that release.
- Download the
Craft-X.X.X.zipor.tar.gzfile.
The Professional Method: Using Composer
Since the release of Craft 3, the CMS has been built on top of PHP’s Composer package manager. This is the preferred method for managing versions because it handles dependencies and ensures your environment is consistent.
If you already have a Craft project and need to move to a specific previous version, you don't necessarily need to download a zip file. Instead, you can modify your composer.json file or use the command line.
Installing a Specific Version via CLI
To change your version via the command line, run the following command in your project root:
composer require craftcms/cms:4.3.0 --update-with-dependencies
Replace 4.3.0 with your desired version. This command updates your composer.json and composer.lock files while ensuring all underlying dependencies are compatible with that specific version of the CMS.
Manual composer.json Modification
Alternatively, you can manually edit the version constraint in your composer.json file:
"require": {
"php": "^8.0.2",
"craftcms/cms": "4.2.0"
}
After saving the file, run composer update to apply the changes. Note that using an exact version number (like 4.2.0) prevents Composer from updating to newer builds until you manually change it again.
Legacy Downloads for Craft 3
If you are working on an older Craft 3 site and need a manual download package (zip or tar.gz) but cannot use the GitHub method mentioned above, Craft CMS maintains a legacy download server. The URL structure is predictable, allowing you to build a link to almost any version.
The URL format for Craft 3 is:
http://download.craftcms.com/craft/{majorVersion}/Craft-{majorVersion}.{minorVersion}.zip
For example, if you need to download Craft 3.0.26.1, the link would be:
http://download.craftcms.com/craft/3.0/Craft-3.0.26.1.zip
Accessing Craft 2 (Legacy) Versions
Craft 2 is now end-of-life, but many developers still maintain legacy sites that require specific builds for maintenance. The download structure for Craft 2 is slightly different, as it includes specific build numbers.
The URL format for Craft 2 is:
http://download.craftcms.com/craft/{version}/{version}.{build}/Craft-{version}.{build}.zip
If you needed to download Craft 2.1 build 2557 in tar.gz format, your URL would look like this:
http://download.craftcms.com/craft/2.1/2.1.2557/Craft-2.1.2557.tar.gz
Keep in mind that when downloading legacy versions, you are still bound by the original Craft CMS license agreement. Furthermore, these versions may contain security vulnerabilities that have been patched in more recent releases.
Critical Considerations for Rollbacks
Downloading the files is only half the battle. If you are trying to "roll back" an existing site to a previous version, you must be extremely careful. Craft CMS does not support automatic rollbacks through the control panel.
The Database Requirement
When Craft updates, it often runs database migrations that alter your schema. These migrations are one-way. If you replace your Craft files with an older version but keep the updated database, the site will likely crash or exhibit unpredictable behavior.
To successfully roll back:
1. Restore Files: Replace the current vendor folder (Craft 3/4) or craft/app folder (Craft 2) with the files from the older version.
2. Restore Database: You must restore a database backup that was taken before the update occurred. Craft automatically creates a backup in storage/backups before running an update, which should be your first point of reference.
Frequently Asked Questions
Can I downgrade Craft using the control panel?
No, the Craft CMS control panel only supports upward migrations. To downgrade, you must manually replace the system files and restore a compatible database backup.
Where can I find my build number for Craft 2?
If you have access to the control panel, the build number is usually located in the footer. If the site is down, you can check the version info in craft/app/Info.php.
Why does Composer fail when I try to install an older version?
Composer may fail if other plugins in your project require a newer version of Craft. You may need to downgrade your plugins simultaneously by specifying their versions in your composer require command.
Wrapping Up
Accessing previous versions of Craft CMS is a straightforward process once you understand the URL patterns and GitHub repository structure. Whether you are using the modern GitHub artifact method or the legacy download server, always remember that the database state is just as important as the file version. Always keep frequent backups, especially before clicking that "Update" button in the control panel.
By following these steps, you can ensure that you always have access to the exact environment you need for development, testing, or legacy support.