Drupal 11 migration guide: from staging to hosting (cPanel & manual)
Migrating a Drupal 11 site in 2026 requires more precision than older versions. With a hard requirement for PHP 8.3+ and a heavy reliance on Composer-based file structures, simply moving files isn't enough. This guide breaks down the three most effective ways to transfer your site between cPanel environments.
1. The "Surgical" Transfer: cPanel Partial Backups
Most users attempt a Full Backup, but as cPanel warns, these cannot be restored via the user interface—they require root access. For a self-service migration, Partial Backups are the superior choice.
Step A: Exporting from Staging
-
Log into your source cPanel and find Backup Wizard.
-
Select Back Up > Home Directory. This captures your Drupal root,
vendorfolder, and hidden files like.htaccess. -
Go back and select MySQL Databases. Download the specific database for your Drupal 11 installation.
Step B: Restoring to hosting
-
On the new host, go to Backup Wizard > Restore.
-
Upload your Home Directory archive first.
-
Crucial: Before restoring the database, go to MySQL® Databases and create a new database and user. Then, use the Restore tool to upload your
.sqlfile into that new database.
2. The "Manual" Workflow: Files and phpMyAdmin
If you prefer total control or the Backup Wizard is unavailable, follow the manual path.
-
File Transfer: Use cPanel File Manager to compress your site files into a
.zip(ensure you include the hidden.envand.htaccessfiles). Upload and extract in the newpublic_html. -
Database Transfer: 1. In the staging phpMyAdmin, use the Export tab (Quick method). 2. In the destination phpMyAdmin, select your new (empty) database and Import the SQL file.
-
Configuration: Open
web/sites/default/settings.phpand update the$databasesarray with your new credentials.
3. The Developer’s Path: SSH and Drush
For those comfortable with the command line (recommended for Drupal 11), this is the fastest and most error-proof method.
Bash
# 1. On Staging: Dump the database
drush sql:dump --result-file=../drupal11_backup.sql
# 2. Transfer files via rsync (preserves permissions)
rsync -avzP /home/staging/public_html/ user@destination-ip:/home/production/public_html/
# 3. On Destination: Import DB
drush sql:query --file=../drupal11_backup.sql
# 4. Rebuild Cache
drush cr
Critical Post-Migration Checklist (SEO and Technical)
1. PHP Version Alignment
Drupal 11 will crash on anything lower than PHP 8.3. Ensure your new cPanel "MultiPHP Manager" is set correctly.
2. Trusted Host Patterns
If your domain name has changed (e.g., from dev.site.com to site.com), update your settings.php:
PHP
$settings['trusted_host_patterns'] = [
'^site\.com$',
'^www\.site\.com$',
];
3. Clear the Registry
Always clear your cache immediately after a move. If you don't have SSH/Drush access, visit yoursite.com/rebuild.php in your browser.
4. File Permissions
Ensure the sites/default/files directory is writable (typically 755). If the migration changed the owner of the files, your site might fail to generate image styles.
Pro Tip: When using cPanel's File Manager to move files, always enable "Show Hidden Files (dotfiles)" in the settings. Missing the
.htaccessfile is the #1 cause of "404 Not Found" errors on internal pages after a migration.
Need help?
Training and Skills Capacity Building
If your web developers and technical teams need the training, sign up at the training course form below so we can set up a fully instructor-led online training.
Web Design and Development for Drupal
Or, if you need help with the technical and heavy lifting of web design, development, deployment, and web hosting for Drupal CMS, especially for D11, contact us so we can meet and discuss.


