Jump to content


Photo

How do I upgrade ProcessWire to the latest version?


  • Please log in to reply
10 replies to this topic

#1 ryan

ryan

    Reiska

  • Administrators
  • 7,779 posts
  • 6510

  • LocationAtlanta, GA

Posted 26 January 2011 - 10:05 AM

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.c...opic,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/r...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.




#2 ryan

ryan

    Reiska

  • Administrators
  • 7,779 posts
  • 6510

  • LocationAtlanta, GA

Posted 26 January 2011 - 04:03 PM

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.


#3 martinluff

martinluff

    Full Member

  • Members
  • PipPipPip
  • 79 posts
  • 2

  • LocationChristchurch NZ

Posted 26 January 2011 - 11:50 PM

Thanks for the instructions Ryan - I guess these could be appended to the http://processwire.c...t/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?

#4 Adam Kiss

Adam Kiss

    Master of the universe

  • Moderators
  • 1,129 posts
  • 327

Posted 27 January 2011 - 03:53 AM

@martinluff – isn't that a bit common sense? :D  ???

#5 martinluff

martinluff

    Full Member

  • Members
  • PipPipPip
  • 79 posts
  • 2

  • LocationChristchurch NZ

Posted 27 January 2011 - 04:02 AM

Yes, you're probably right, must be getting a bit pedantic in my old age  ;)

#6 Adam Kiss

Adam Kiss

    Master of the universe

  • Moderators
  • 1,129 posts
  • 327

Posted 27 January 2011 - 04:17 AM

No harm done! :)

Though, after little thinking I agree with you! If we write it there, we can save new PW users a little confusion!

And us some stupid questions :D

#7 ryan

ryan

    Reiska

  • Administrators
  • 7,779 posts
  • 6510

  • LocationAtlanta, GA

Posted 27 January 2011 - 01:36 PM

That's a good point about .htaccess–I will make a point to mention that when moving this over to the install and/or requirements directions.

#8 MarcC

MarcC

    Sr. Member

  • Members
  • PipPipPipPip
  • 315 posts
  • 107

  • LocationCalifornia

Posted 31 October 2011 - 09:33 AM

Just overwrote my custom admin theme during an upgrade--no big deal since I have a backup, but might be worth warning about in the instructions since we have some really good ones these days. :-)

I'm a freelance, processwire-using web designer based in california. work site | personal site | visuals


#9 ryan

ryan

    Reiska

  • Administrators
  • 7,779 posts
  • 6510

  • LocationAtlanta, GA

Posted 31 October 2011 - 11:19 AM

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.c...d/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.

#10 MarcC

MarcC

    Sr. Member

  • Members
  • PipPipPipPip
  • 315 posts
  • 107

  • LocationCalifornia

Posted 31 October 2011 - 02:39 PM

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.

I'm a freelance, processwire-using web designer based in california. work site | personal site | visuals


#11 NooseLadder

NooseLadder

    Sr. Member

  • Members
  • PipPipPipPip
  • 134 posts
  • 29

Posted 13 December 2013 - 06:12 AM

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. ^-^






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users