Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Updating plugins properly

edited May 2012 in Vanilla 2.0 - 2.8

Hello everyone,
I'm new to Vanilla so please bare with me. What is the proper procedure to update a plugin. Eg. If I install a plugin and then a new version is released, what is the proper way to upgrade it without losing any data?

Thanks,
Jonah

Best Answers

  • KasperKasper Vanilla Staff
    Answer ✓

    You mean so when a new version comes out I just have to copy the new files and that's it?

    Exactly :)

    What happens if a plugin changes that requires changes in the database, is there an upgrade process I have to go through or would it just simply do everything it needs to do?

    In this case I think it's enough to simply disable and then re-enable the plugin once you've copied over the new files. You might wanna check with a dev or some techy-type like x00 though :)

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • x00x00 MVP
    Answer ✓

    I do hot update in my plugins but most do not do this, so if there there is additional structure you need to run setup by enabling and disabling the plugin after update. Otherwise you could get error stating that column don't exist, etc.

    You should also makes sure that you have the right version of vanilla for that plugin and that any requires plugins are already enabled.

    grep is your friend.

  • Answer ✓

    Always read the changelog and other developer documentation for the plugin for upgrading. They SHOULD include any special upgrade instructions.

    A best practice that I've seen most developers here use is to include an automated database maintenance script that will run behind the scene and make any changes to tables and migrate legacy data. Of course, you should ALWAYS back up your Vanilla directories and your MySQL database before any plugin upgrades.

    And if you do run into a problem post it here, and someone will try to help. We're all in this together!

  • hbfhbf MVP
    Answer ✓

    most people will post upgrade instructions if its anything other than a hot update (just copy over and done)

    if i change table structures, i will always note that on the plugin page and instruct the user on what to do, such as disable, overwrite and then re-enable.

    when in doubt, you can always follow the instructions above and it should work.

    there are some rare exceptions to this rule... but most of those guys aren't posting plugins anymore.

Answers

  • what kind plugin you use ?

  • if you change the plugin source code like i do ,it will be confuse .

    if you not do that , i think the plugin author will consider that ,so it must not be worried.

    if you still worried ,just paste the plugin you use ,let us help you

  • Plugins like Q&A, Tagging, Voting plus a bunch of others included by default.

  • KasperKasper Vanilla Staff

    All data is stored within your database and/or the config.php file, so you should be able to simply override the old plugin with the new version.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • kasperisager said:
    All data is stored within your database and/or the config.php file, so you should be able to simply override the old plugin with the new version.

    You mean so when a new version comes out I just have to copy the new files and that's it? What happens if a plugin changes that requires changes in the database, is there an upgrade process I have to go through or would it just simply do everything it needs to do?

  • KasperKasper Vanilla Staff
    Answer ✓

    You mean so when a new version comes out I just have to copy the new files and that's it?

    Exactly :)

    What happens if a plugin changes that requires changes in the database, is there an upgrade process I have to go through or would it just simply do everything it needs to do?

    In this case I think it's enough to simply disable and then re-enable the plugin once you've copied over the new files. You might wanna check with a dev or some techy-type like x00 though :)

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • x00x00 MVP
    Answer ✓

    I do hot update in my plugins but most do not do this, so if there there is additional structure you need to run setup by enabling and disabling the plugin after update. Otherwise you could get error stating that column don't exist, etc.

    You should also makes sure that you have the right version of vanilla for that plugin and that any requires plugins are already enabled.

    grep is your friend.

  • Answer ✓

    Always read the changelog and other developer documentation for the plugin for upgrading. They SHOULD include any special upgrade instructions.

    A best practice that I've seen most developers here use is to include an automated database maintenance script that will run behind the scene and make any changes to tables and migrate legacy data. Of course, you should ALWAYS back up your Vanilla directories and your MySQL database before any plugin upgrades.

    And if you do run into a problem post it here, and someone will try to help. We're all in this together!

  • hbfhbf MVP
    Answer ✓

    most people will post upgrade instructions if its anything other than a hot update (just copy over and done)

    if i change table structures, i will always note that on the plugin page and instruct the user on what to do, such as disable, overwrite and then re-enable.

    when in doubt, you can always follow the instructions above and it should work.

    there are some rare exceptions to this rule... but most of those guys aren't posting plugins anymore.

Sign In or Register to comment.