drush ev '\Drupal::entityManager()->getStorage("shortcut_set")->load("default")->delete();';
lando ssh --service appserver --user root --command "a2enmod headers"
lando ssh --service appserver --user root --command "service apache2 restart"
Install D8 using drush
../vendor/drush/drush/drush si standard --db-url=mysql://dbusername:dbpassword@localhost/dbname --site-name='Site Name'
lando drush si standard --db-url=mysql://drupal8:drupal8@database/drupal8 --site-name='d8composer'
Disable module manually
// Read the configuration.
/**
* Implements hook_views_pre_render().
*/
function MODULENAME_views_pre_render(\Drupal\views\ViewExecutable &$view) {
if ($view->id() == 'views_machine_name' && $view->current_display == 'views_display_name') {
$result = $view->result;
foreach ($result as $i => $row) {
vim ~/.config/fish/config.fish
alias drupalcs="phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,css,info,txt,md'"
alias drupalcsp="phpcs --standard=DrupalPractice --extensions='php,module,inc,install,test,profile,theme,css,info,txt,md'"
alias drupalcbf="phpcbf --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,css,info,txt,md'"
set -x ANDROID_HOME $HOME/Android/Sdk
set -x PATH $PATH $ANDROID_HOME/tools
set -x PATH $PATH $ANDROID_HOME/tools/binsudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set error in Ubuntu
To fix
- If root user is not set, goto recovery mode, select drop as root shell prompt, then it will goto root prompt, run
mount -o remount,rw /
If you get following error while installing php7.1-bcmath extension
The following packages have unmet dependencies:
php7.1-bcmath : Depends: php7.1-common (= 7.1.17-0ubuntu0.17.10.1) but 7.1.17-1+ubuntu17.10.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages
These are the ways you could upgrade core for 7 & 8
- Take back up of files and db
- Put site in maintenance mode.
- Delete all files except the "sites" folder and any files such as ".htaccess" and "robots.txt" that have been customized.
- Download latest D7 version and upload the new files except the sites directory or the .htaccess or .robots.txt files.
- If changes have been made to robots.txt or .htaccess in the new version ensure these are incorporated into your version.
- Run Update.php by visiting yourdomain.com/update.php