Drupal migration
Moving your Drupal site doesn't have to be difficult. Follow our step-by-step guide or let your new hosting provider do it for free.
Providers with free migration service
These hosting providers migrate your Drupal site for free. No hassle, they handle it for you.
Why migrate to new hosting?
Reasons to switch to a different hosting provider
Better performance
Drupal needs solid resources. A specialized hosting provider with SSD, caching and enough RAM makes your site much faster.
Save costs
Better price-quality ratio. Some providers offer more value for the same money, or lower prices with equal specs.
Better support
Dutch support that knows Drupal. Faster response times and experts who can actually help you.
Better security
Modern security features like automatic updates, malware scanning and advanced firewall protection.
Migrate Drupal in 6 steps
Want to do it yourself? Follow these steps for a safe migration
Drupal migration is more technical than WordPress. Consider a provider with free migration service if you have no experience with databases and SSH.
Make a complete backup
Before you start: make a backup of database and all files. Test if you can restore these.
-
Database: Export via phpMyAdmin or:
drush sql-dump > backup.sql - Files: Complete site directory (including sites/default/files)
- Download: Store backups locally, not only on the server
Choose your new hosting
Select a hosting provider that meets Drupal's requirements.
Check these specs:
- • PHP 8.1+ (voor Drupal 10)
- • Minimaal 512MB RAM, liever 1GB+
- • MySQL 5.7.8+ of MariaDB 10.3.7+
- • Composer support (cruciaal!)
- • SSH toegang voor Drush commands
Create database on new server
Via cPanel MySQL Databases or command line:
CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON drupal_db.* TO 'drupal_user'@'localhost';
FLUSH PRIVILEGES;
Note these details, you'll need them for settings.php
Upload Drupal files
Transfer your complete Drupal installation to the new server.
- Via FTP/SFTP: Upload all files to public_html or desired directory
-
Or via SSH:
rsync -avz old-server:/path/ new-server:/path/ - Important: Also upload .htaccess and composer.json/composer.lock
composer install on new server.
Import database and update settings
Import your database backup and configure the connection.
1. Import database:
Or via phpMyAdmin: Import tab, select backup.sql
2. Update sites/default/settings.php:
'database' => 'drupal_db',
'username' => 'drupal_user',
'password' => 'secure_password',
'host' => 'localhost',
'driver' => 'mysql',
];
3. Check file permissions:
- • sites/default/files: 755 (writable)
- • sites/default/settings.php: 444 (read-only)
- • Andere directories: 755, files: 644
Test and change DNS
Test thoroughly on new server before changing DNS.
- Test via temporary domain or modify local hosts file
- Check all pages, admin functionality and modules
-
Run
drush updbfor database updates -
Clear caches:
drush cr
Useful Drush commands for migration
Speed up the migration process significantly
Create database backup:
drush sql-dump > backup-$(date +%Y%m%d).sql
Import database on new server:
drush sql-cli < backup.sql
Run database updates after import:
drush updatedb
Clear cache after migration:
drush cache-rebuild
Import configuration (if using config management):
drush config-import
Status check on new server:
drush status
Common migration problems
And how to solve them
Database connection error
Problem: "Failed to connect to database"
Solution: Check database credentials in settings.php. Often database host (localhost vs IP address) differs between servers.
Missing vendor directory
Problem: "Fatal error: Class not found"
Solution: For Composer-based sites: run composer install on new server. Vendor directory must be built locally.
File permission errors
Problem: "The directory sites/default/files is not writable"
Solution: Set correct permissions: chmod 755 sites/default/files. Also check ownership with chown.
PHP version mismatch
Problem: "This version of Drupal requires PHP X.X"
Solution: Check PHP version with php -v. You may need to select PHP version in cPanel or adjust .htaccess.
Broken image/file links
Problem: Images and files not loading
Solution: Check if sites/default/files was fully copied. Run drush cr to clear file URL cache.
Trusted host settings
Problem: "The provided host name is not valid for this server"
Solution: Update trusted_host_patterns in settings.php with your new domain name.
Migration checklist
Print this checklist and tick off during migration
Before migration:
During migration:
After migration:
Need help with migration?
Choose a hosting provider with free migration service. They handle everything for you.
Compare Drupal hosting