Jump to content

How do I upgrade ProcessWire to the latest version?


ryan
 Share

Recommended Posts

ProcessWire upgrades are easy because everything unique to your site is contained under the /site/ directory. That directory is not part of the ProcessWire source, so you just replace everything else, and leave your /site/ directory as it is. Following are instructions on how to do this. If you find an UPGRADE.txt file in the new version of ProcessWire, you should give those instructions authority over these. However, these instructions outline how the majority of ProcessWire upgrades are performed.

Please note: these instructions do not apply to a 2.0 -> 2.1 upgrade. For instructions on how to perform that upgrade, please see this thread: http://processwire.com/talk/index.php/topic,583.0.html

Upgrading ProcessWire from the ZIP file


1. Download the latest version of ProcessWire from the downloads page at GitHub and click the "Download ZIP" button: https://github.com/ryancramerdesign/ProcessWire/archives/master

2. Extract the ZIP file somewhere temporary (I usually extract on my desktop).

3. Replace the following files from your existing installation with the new versions found in the ZIP you extracted. If you want to be able to revert back to the old version, backup any files you replace first.  

  • Replace: /wire/ with the new version
  • Replace: /index.php with the new version
  • Replace: /.htaccess with the new version (rename htaccess.txt from the ZIP to .htaccess)

Your site is now upgraded. Test that everything works as it should.

Upgrading ProcessWire using Git & GitHub:


If you originally installed from the source at GitHub, you can upgrade to the latest version of ProcessWire easily by using git pull.

cd /your/processwire/installation/
git pull

All files related to your specific site are contained in the /site/ dir, which is not part of the source files on GitHub, so it should remain untouched through the git pull (though it doesn't hurt to back it up).

Your site is now upgraded, but you'll want to finalize it by doing a little housekeeping. You will find that git pull added some files that weren't there before. Here's what you should do with them:

  • Delete: /install.php
  • Delete: /site-default/
  • Rename: /htaccess.txt => .htaccess

The above steps are optional if you are upgrading a non-production/development server. Since I git pull regularly, I just leave these files in place so that I don't have to delete them every upgrade. In addition, the .htaccess file rarely changes through upgrades. While optional on a local development server (that isn't accessible from outside), on a production server, you absolutely need to perform these steps.

Your site is now upgraded. Test that everything works as it should.

Link to comment
Share on other sites

Another easy way you can upgrade from the ZIP is to unzip the archive, and copy the /site/ dir from your existing installation into it. Then delete /site-default/ and /install.php, and rename htaccess.txt to .htaccess. Upload to your web server or development environment (replacing your existing installation), and you are good to go.

  • Like 2
Link to comment
Share on other sites

Thanks for the instructions Ryan - I guess these could be appended to the http://processwire.com/about/requirements/ page?

Plus, I just wonder about including a warning that you might want to edit .htaccess with any new settings for ProcessWire rather than overwrite with an updated htaccess.txt since it might include other settings required on the server?

  • Like 1
Link to comment
Share on other sites

  • 9 months later...

Custom admin themes go in /site/templates-admin/. The /site/ structure is never touched during an upgrade, so it should be impossible to overwrite an admin theme during an upgrade. http://processwire.com/download/admin-themes/

I'm guessing you had your custom admin theme in /wire/templates-admin/ instead? :) Just remember that /site/ is all your stuff, and /wire/ is all ProcessWire's stuff.

The reason upgrades are easy is because you can just replace your entire /wire/ directory with the new version and you are set. But that also means it's a bad idea to put any of your own stuff in /wire/.

Btw, a good practice when upgrading is to bring in the new /wire/ directory under a name like /wire.new/. Then once it's there, rename your old /wire/ directory to /wire.old/, and then /wire.new/ to /wire/. Test that everything is working well. Once comfortable, delete /wire.old/. But if for some reason you noticed a problem after putting in the new /wire/ then, you can simply rename the /wire.old/ dir back to /wire/ so that you aren't suddenly in a bind and unable to revert.

  • Like 2
Link to comment
Share on other sites

Ah, I must have misread an instruction somewhere. I had been putting admin themes in /wire/templates-admin, overwriting the default, which felt weird. This makes a lot more sense to me. :-) Thanks for the tip, too.

Link to comment
Share on other sites

  • 2 years later...

Another easy way you can upgrade from the ZIP is to unzip the archive, and copy the /site/ dir from your existing installation into it. Then delete /site-default/ and /install.php, and rename htaccess.txt to .htaccess. Upload to your web server or development environment (replacing your existing installation), and you are good to go.

First time I've tried this. Worked like a charm. Thanks. ^-^

Link to comment
Share on other sites

  • 2 years later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...