MySQL queries for bulk editing Drupal url aliases


/ Published in: MySQL
Save to your folder(s)

In case you don't feel like loading 3 pages to edit a single url alias.


Copy this code and paste it in your HTML
  1. # Change all aliases with paths like foo/* to bar/*
  2. UPDATE url_alias SET dst = REPLACE(dst, 'foo/', 'bar/') WHERE dst LIKE 'foo/%';
  3.  
  4.  
  5. # Delete all aliases with paths like foo/*
  6. DELETE FROM `url_alias` WHERE dst LIKE 'category/%';

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.