42

From the working directory (site root) use this command: drush dl module_name --dev To get the DEV version. Or: drush dl module_name --select To display a list of available versions. Afterwards do drush updatedb to apply any database updates made by the module. You should check out https://drushcommands.com/ and all the commands on that page (the ...


34

If you use Drush you can update all security issues with your site via (this is Core and 3rd party modules): drush up --security-only if you want to see what it will do, but not do any of the actual changes you can issue: drush up --security-only --simulate If you want an easy way to update Drupal Core to the newest release you can use a patch site such as:...


33

You can use drush pm-update to update any module, and add the version information to update to a specific version. For example if you want to update to a 7.x-1.x-dev version of a module, you can use the following command: drush pm-update MODULE_NAME-7.x-1.x-dev or, shorter: drush up MODULE_NAME-1.x-dev so you can omit 7.x-.


31

You need to implement hook_update_projects_alter(). Alter the list of projects before fetching data and comparing versions. Most modules will never need to implement this hook. It is for advanced interaction with the update status module: mere mortals need not apply. The primary use-case for this hook is to add projects to the list, for example, to ...


30

The method below will stop the "available update" emails Drupal admins receive. Go here: http://yourwebsite.com/admin/reports/updates/settings Remove your email(s) from the textarea: "E-mail addresses to notify when updates are available" Save Note: If you want to stop the "available updates" emails and the update alert messaging then simply disable the ...


29

field_delete_field($field_name) will mark the $field_name for deletion on next cron run. You could use field_purge_batch to do the deletion, if you don't want to do it on cron run. EDIT: field_delete_field() should be used when you need to delete the field from other bundles as well. If you only wish to delete the field from a particular bundle you should ...


24

To remove a field from a particular bundle you can use field_delete_instance() Marks a field instance and its data for deletion. Example: function my_module_update_7001() { if ($instance = field_info_instance('node', 'field_name', 'page')) { field_delete_instance($instance, TRUE); field_purge_batch(1); } } To remove a field from the system ...


24

As mentioned in the original question, and follow-up comments, there are a variety of contrib modules and manual methods to accomplish this. To do it automatically, or in a custom fashion, I think hook_update_N() is still probably the most viable option. For instance, this is an example from the Head 2 Head to update system.site to set the default_langcode:...


21

On Drush 5.7 you can run the command drush pm-update --no-core module-name. Drush will automatically backup the current module, download the new version and prompt you to update the database.


21

In short, if your site runs on PHP 5.3, it will run on 5.5 as well, go upgrade! (Your dev environment, until a real release is out) With the short answer out of the way, here are some more details. With regard to "Does Drupal work on it", very little changed from PHP 5.3, to 5.4 to 5.5. The one issue that showed up under PHP 5.4 was really just PHP being ...


19

The project key from the .info file is added by the packaging script on drupal.org to identify what project the module is from. The primary use is for the Update status module to monitor versions of installed packages and notify administrators when new versions are available. You just remove or comment this line in .info file and Drupal stop checking for ...


19

drush entity-updates is a developer tool. If you change entity/field definitions in your custom module you can quickly apply this. In production this should not happen. If you update a module between official releases, then the update code in the module should handle this. But in your case you are mentioning that your site is in developing. So there are a ...


18

The schema_version column in the system table contains the version of the last successful update. Manipulate that value and you can re-test your update. The name column is the machine name of the module, same as the info file is named. This query will do the trick for you. UPDATE system SET schema_version = XXXX WHERE name = 'name_of_module';


17

drush rf will refresh the available releases and at that point you should be able to run drush up or drush up drupal.


16

You can disable the module Update in the module list, but you will never be aware about update and security updates.


16

Solution 1: SQL Query While checking updates Drupal creates some rows inside the key_value table which should be deleted after checking is complete but looks like they doesn't for some reason. So deleting the related rows manually solved my problem: DELETE FROM key_value WHERE collection = 'update_fetch_task'; Solution 2: hook_update_N() If it is not ...


15

So just a copy paste from drupal.org. You also need to add the schema definition to hook_schema. /** * Create new database table {mytable2}. */ function mymodule_update_7101() { $schema['mytable2'] = array( // table definition array goes here ); db_create_table('mytable2', $schema['mytable2']); }


15

Drupal 7 If you're using drush, you may run: drush eval 'menu_rebuild();' If won't work, see: How to do menu rebuild when having PHP Fatal error? Drupal 6 drush php-eval 'drupal_rebuild_theme_registry()' memcached If you're using memcached, you've to restart it. On Linux: /etc/init.d/memcached restart On OS X (if using Homebrew): brew services ...


15

There are few ways of forcing module update. Calling the update function directly. $sandbox = []; module_load_include('install', 'FOO'); FOO_update_7001($sandbox); Resetting the schema version to the point of interest and run the updates again as usual. drupal_set_installed_schema_version('module_name', '7000'); Or reset to re-run only the latest update ...


14

Just providing a code sample to help the chosen answer: function MYMODULE_update_projects_alter(&$projects){ unset($projects['slug_of_the_module_you_want_to_disable']); //dsm($projects); // view a list of projects } Enter the module name in the $projects[] variable to disable. If you're not sure what the slug is (will be lowercase and ...


14

Setting it to 0 should work. system_schema() says the value should be: -1 if the module is not installed (its tables do not exist); 0 or the largest N of the module's hook_update_N() function that has either been run or existed when the module was first installed.


13

drush updatedb --no (shorthand: drush up -n) will list them and take no further action.


12

You can do it in two ways. drush pm-updatecode --lock=module_to_ignore Use the update_advanced module. It allows you to mark modules that you want to ignore on the module administration page. In particular, the per-project settings to ignore certain projects or even specific releases, is absent in the core version of the module. The "Update status ...


11

I use: drush pm-updatecode --check-disabled followed by: drush @sites updatedb The --check-disabled option was added 2014-11-04


11

Open the database schema, then delete all contents of menu_links and menu_router tables with the following SQL queries: DELETE FROM menu_links; DELETE FROM menu_router; Then run http://example.com/update.php. It will call menu_rebuild(), which will populate these tables with 'fresh' data. It worked for me after a "PHP Fatal Error: Out of memory" turned ...


11

I presume that you are using drupal-composer/drupal-project as the basis for your project. If not, take a look at that project, and compare it with yours. Also, you said that you want to use composer to manage Drupal 8 dependencies, so I presume that you have selected your contrib modules via composer require drupal/devel rather than drush dl devel. If ...


11

Download drupal 8.0.2 Extract Copy the core directory into your project. Copy the .htaccess , composer.lock & composer.json files to your project Copy the vendor directory to your project Go to yoursite.com/update.php Follow the on-screen instructions Note: if you use composer then see my answer to this question


11

Updates must be run before configuration is imported A pending issue against core will ensure that the code and schema versions match before allowing configuration to be imported. Problems with config import before updates An update hook relying on a configuration value could end in a different result than if it were run on the pre-import value. An update ...


10

drush vset update_check_disabled 1 -y


10

Another reason why an update hook would not run is a mismatch between the update hook name and the major release number of the module (see .info file). For example: the update hook mymodule_update_7001 does not run if the module version is 7.x.1.0. In such case you must rename the hook to mymodule_update_7101. See the hook_update API documentation


Only top voted, non community-wiki answers of a minimum length are eligible