I am mikek's Blog

The personal blog of Mike Karthauser, who you may know from Brightstorm Limited or the internet.

Disabling user interface code updates

If your site is relying on an external deployment system (perhaps with a staging and production workflow), you can disable all of the functionality that allows site administrators to install code through the administrative user interface by placing the following line in your site’s settings.php file:

$conf['allow_authorize_operations'] = FALSE;
You will still be able to run the Update manager to check the status of available updates, but you will not be able to install those updates or new modules and themes directly via the web interface.

From
https://www.drupal.org/documentation/modules/update

Filed under: development, drupal, ,

Cleat Drupal cache via SQL

A handy little bit of sql to clear the cache tables just before you back up a drupal db to sql.

Steps to follow:

  1. Replace {db_name} by the real project’s database name.
  2. Execute the sentence.
  3. Copy the generated string (TRUNCATE list, one for each table).
  4. Execute the string  copied in the previous step (TRUNCATE list).


SELECT
CONCAT('TRUNCATE TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ';') AS table_name
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = '{db_name}'
AND TABLE_NAME LIKE 'cache_%'
AND TABLE_TYPE = 'BASE TABLE'

The resulting string must be something like this (will vary depending on the Drupal version and the installed modules):


TRUNCATE TABLE {db_name}.cache_admin_menu;
TRUNCATE TABLE {db_name}.cache_block;
TRUNCATE TABLE {db_name}.cache_bootstrap;
TRUNCATE TABLE {db_name}.cache_field;
TRUNCATE TABLE {db_name}.cache_filter;
TRUNCATE TABLE {db_name}.cache_form;
TRUNCATE TABLE {db_name}.cache_image;
TRUNCATE TABLE {db_name}.cache_menu;
TRUNCATE TABLE {db_name}.cache_metatag;
TRUNCATE TABLE {db_name}.cache_page;
TRUNCATE TABLE {db_name}.cache_path;
TRUNCATE TABLE {db_name}.cache_token;
TRUNCATE TABLE {db_name}.cache_update;
TRUNCATE TABLE {db_name}.cache_variable;
TRUNCATE TABLE {db_name}.cache_views;
TRUNCATE TABLE {db_name}.cache_views_data;

From
http://zonesoftware.co/en/blog/article/clear-cache-in-drupal-via-sql

Filed under: development, ,

what's hot

Flickr Photos

Tree graffiti

Tree graffiti

Tree graffiti

More Photos

Sponsor Mike run the Bath Half marathon

mikek on twitter