0

I have updated the require Drupal core files and folders, but I didn't run update.php.

Is it required to run update.php? If not, which types of issues I will face in future?

2 Answers 2

5

Running update.php is only required if there are new implementations of hook_update_N() done from a module, which the hook used when:

  • The schema for a database table is changed
  • A database table is created, deleted, or renamed
  • The content of a database table is altered
  • A persistent variable is added, removed, changed, or renamed

If the release notes for the version you installed say it is necessary to run update.php, or you check the content of every .install file and notice there are new implementations of hook_update_N(), then you need to run update.php.
If you don't do it, modules will start not to work, and you could get database error messages (for example, about a database table not existing, or a table field not being present).

If the release notes for the release you installed say it is not necessary to run update.php, or you check the content of every .install file and notice there aren't new implementations of hook_update_N(), then you don't need to run update.php.
If you don't run update.php, there isn't any issue, for this update, but it's not said you can continue avoiding to run update.php for future updates. For each update, you would need to check what the release notes say about or the code in .install files.

What I said holds true also for third-party modules, not just for Drupal core.

If you want to avoid reading the release notes for every installed modules, which could also not report if running update.php is necessary or not, or check the code in .install files, which would also require you to notice if there are new hook_update_N() implementations, you just run update.php after updating core or any third-party module.

I normally run update.php every time I update core or modules. If there are update hooks that need to run, they will run. If there isn't any update hook that needs to run, update.php will end faster and show me a page with a link to the front page and the administrative pages.

0

Yes it is required and highly recommended to run update.php after certain operations like updating drupal core, updating a module, uninstalling a module, updating or installing a theme...

If you don't, the code will sometimes expect a different database structure than the one available after you updated drupal/modules/themes and that systematically leads to errors and broken things.

If you're only using contributed modules/themes you shouldn't have any problem. If you have custom modules, settings etc.. you may run into some complications.
In any case, you should always backup everything (on a regular basis) and create one or several copies of your current website and run some tests before updating the live website.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.