drush
get_one_time_login_for_domains.sh
drush uli
https://my-project.dev.erd.fish/user/reset/1/1743658959/GxIzcvUB-Hv7E9WPoxyAIF-_pXD4kTH3GCIXQ2QFZz0/login
get_environment_one_time_login.txt
copy:
/user/reset/1/1743658959/GxIzcvUB-Hv7E9WPoxyAIF-_pXD4kTH3GCIXQ2QFZz0/login
look up your site domains in the .ddev/.ddev-docker-compose-base.yaml:
external_links:
- "ddev-router:cms.ddev.site"
Add everything after '/' from the drush uli command.
cms.ddev.site/user/reset/1/1743659359/GxIzcvUB-Hv7E9WPoxyAIF-_pXD4kTH3GCIXQ2QFZz0/login
12.06.2025 | Lothar Ferreira Neumann
Login with drush uli on multiple domains of a multi-site Drupal system
HelloWorldCommands.php
<?php
declare(strict_types=1);
namespace Drupal\nice_module\Drush\Commands;
use Drupal\Component\DependencyInjection\ContainerInterface;
use Drupal\nice_module\HelloWorldService;
use Drush\Attributes as CLI;
use Drush\Commands\DrushCommands;
/**
* A Drush command class for saying "hello" to the world.
*/
final class HelloWorldCommands extends DrushCommands {
public function __construct(
private readonly HelloWorldService $helloWorldService,
) {
parent::__construct();
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container): self {
return new static($container->get('nice_module.hello_world_service'));
}
#[CLI\Command(name: 'nice_module:say-hello', aliases: ['smci'])]
#[CLI\Argument(name: 'userName', description: 'The name of the user.')]
public function sayHello(?string $userName = NULL): void {
$this->helloWorldService->sayHello($userName, $this->output());
$this->logger()->success('I said "hello" to the user.');
}
}
13.11.2025 | Peter Majmesku
Drush 12+: Simplified Drush commands with PHP 8 attributes
drush_core_requirements.sh
drush core:requirements
01.09.2026 | Michael Ebert
Show the status report with Drush in your terminal
drush_override_ignored_table_list.sql
drush sql:dump --structure-tables-list=cache,cachetags,'cache_*',history,'search_*',sessions,webprofiler
05.02.2026 | Michael Ebert
Make a database dump including data from an ignored table
First, you could check if there are different states of your config between database and local file system.
drush_config_status.sh
drush config:statusThere is an option `--diff` for the drush command that will print the changes first.
drush_config_import_diff.sh
drush config:import --diffThis also works for config export.
drush_config_export_diff.sh
drush config:export --diff
19.03.2026 | Michael Ebert
Preview changed config before import/export with drush
drush_migrate_status.sh
drush migrate:statusDisplay a summary of the status of your migrations.
drush_migrate_import.sh
drush migrate:importTrigger the import process for migrations.
drush_migrate_reset_status.sh
drush migrate:reset-statusReset the migration statuses if your migration get stuck.
drush_migrate_rollback.sh
drush migrate:rollbackRollback your migrations by undoing changes made.
drush_migrate_stop.sh
drush migrate:stopStop a running migration gracefully.
drush_migrate_field_source.sh
drush migrate:fields-sourceList field sources of your sources plugin.
drush_migrate_message.sh
drush migrate:messagesShow migration messages.
17.05.2024 | Michael Ebert
Drush Migrate Commands
drushCommand_php_cli.sh
drush php:clidrushCommand_php_eval.sh
drush php:evaldrushCommand_php_script.sh
drush php:script
14.04.2026 | Michael Ebert, Lothar Ferreira Neumann
drush php commands
drushCommand.sh
drush php
10.03.2026 | Lothar Ferreira Neumann
Test code by opening a PHP CLI with drush
clear_cache.php
<?php
apcu_clear_cache();
opcache_reset();
13.11.2025 | Nikolas Kopp