Upgrading ProcessWire from one version to another

Most version upgrades in ProcessWire are as simple as just replacing the /wire/ directory with the new version.

However, we recommend that you be familiar with the following best practices and general upgrade process, as well as any version-specific upgrade notes found in the version README.md file.

Best Practices Before Upgrading

  • Backup your database and backup all the files in your site (ensuring you can revert if needed).
  • When possible, test the upgrade on a development/staging site before performing the upgrade on a live/production site.
  • Login to your ProcessWire admin under a superuser account before upgrading.
  • Temporarily enable debug mode during the upgrade (optional but recommended).

If you have 3rd party modules installed, confirm that they are compatible with the ProcessWire version you are upgrading to. If you cannot confirm compatibility, uninstall the 3rd party modules before upgrading, when possible. You can attempt to re-install them after upgrading. If uninstalling is inconvenient, just be sure you have the ability to revert if for some reason one of your modules does not like the upgrade. Modules that are compatible with ProcessWire 2.4-2.7 are generally going to also be compatible with 3.0 with a few exceptions.

If you prefer an automatic/web-based upgrade, an upgrade module is available. This upgrade utility can also help with upgrading other modules as well. However, the upgrade from 2.x to 3.x is a major upgrade and we recommend performing this upgrade manually rather than with any automated tools.

General Upgrade Process

Before upgrading, login to your ProcessWire admin under a superuser account. This is not required to upgrade, but is recommended for more verbose output during the upgrade. Upgrading from one version of ProcessWire to another is a matter of deleting/replacing these files and directories from your old version, and putting in fresh copies from the new version:

  • /wire/
  • /index.php
  • /.htaccess

Removing and replacing the above directory/files is typically the primary thing you need to do in order to upgrade. But please see the version-to-version specific upgrade notes documented in your version's README.md file. Further below are more details about how you should replace the files mentioned above.

After replacing the /wire/ directory (and the other two files if needed), hit reload in your browser, anywhere in the ProcessWire admin. You should see messages at the top of your screen about updates that were applied. Depending on which version you are upgrading from, you might also see error messages–this is normal. Keep hitting reload in your browser until you no longer see any upgrade related messages (up to 5 reloads may be necessary).

Renaming is an alternative to deleting, which gives you a quicker path to revert should you want to. For example, you might rename your /wire/ directory to be /.wire-2.7.2/ with ".wire" rather than "wire" to ensure the directory is hidden, and the 2.7.2 indicating the version that it was. Once your upgrade is safely in place, you could delete that .wire-2.7.2 directory (or keep it around). If you keep old version dirs/files in place, make sure they are not http accessible. This is typically done by preceding the directory with a period to make it hidden.

Replacing the /wire/ directory

When you put in the new /wire/ directory, make sure that you remove or rename the old one first. If you just copy or FTP changed files into the existing /wire/ directory, you will end up with both old and new files, which will cause an error.

Note that the /wire/ directory does not contain any files specific to your site, only to ProcessWire. All the files specific to your site are stored in /site/ and you would leave that directory alone during an upgrade.

Replacing the /index.php file

This file doesn't change often between minor versions. As a result, you don't need to replace this file unless it has changed. But when in doubt, you should replace it. When upgrading from 2.7 to 3.x you will definitely need to replace it.

Replacing the .htaccess file

This is also a file that does not always change between versions. But when it changes, it is usually important for security that you are up-to-date. When in doubt, replace your old .htaccess file with the htaccess.txt from the new version.

This file is initially named htaccess.txt in the ProcessWire source. You will want to remove your existing .htaccess file and rename the new htaccess.txt to .htaccess

Sometimes people have made changes to the .htaccess file. If this is the case for your site, remember to migrate those changes to the new .htaccess file.

If you are using ProCache, it will have added some things to your .htaccess file. Copy these changes from your old .htaccess file to your new one. The changes are easy to identify in your previous .htaccess file as they start and end with a # ProCache comment. Alternatively, you can have ProCache re-apply the changes itself by logging in to your admin and going to Setup > ProCache.

Troubleshooting Upgrades

Please see our Troubleshooting Upgrades page.

Twitter updates

  • This week we’ve got a few new and interesting core updates in progress, though none quite ready to release just yet. So rather than releasing version 3.0.154 today, I thought we'd instead take a brief look at what’s coming over the next few weeks… More
    3 April 2020
  • ProcessWire 3.0.153 (dev) focuses on comments field updates, significant refactoring/improvements to ProcessWire’s core Template class and PagesLoader class (which is used by the pages API variable), and we introduce a useful new pages API method— More
    20 March 2020
  • ProcessWire 3.0.152 core updates— This week we have some major improvements to our core date/time Inputfield, as well as a new ability to specify your own custom classes for Page objects— More
    6 March 2020

Latest news

  • ProcessWire Weekly #308
    In the 308th issue of ProcessWire Weekly we're going to take a look at some upcoming core and pro module updates, check out two all-new third party modules, and more. Read on!
    Weekly.pw / 4 April 2020
  • ProcessWire updates and additions in progress
    This week we’ve got a few new and interesting core updates in progress, though none quite ready to release just yet. So rather than releasing version 3.0.154 today, I thought we'd instead take a brief look at what’s coming over the next few weeks. This post covers all the details.
    Blog / 3 April 2020
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK