How to Migrate a WordPress Site to DreamHost
In this article
Migrating a WordPress site to DreamHost means moving your website’s files, database, and settings from your current host to DreamHost’s servers. This guide walks you through the entire process, from preparation to going live, so you can switch hosts without losing content or experiencing prolonged downtime.
What You'll Need
- Access to your current hosting account (cPanel, Plesk, or similar) to download files and export the database.
- DreamHost account with an active hosting plan. If you don’t have one, sign up and choose a plan that fits your needs.
- Your WordPress admin credentials (for both old and new sites).
- FTP client (like FileZilla) or file manager in your current host’s control panel.
- phpMyAdmin access on both old and new hosts (DreamHost provides this via its panel).
- Your domain name’s DNS management access (usually at your domain registrar).
Step-by-Step
- Back up your current WordPress site. In your old host’s cPanel, open File Manager and select all files in the public_html folder (or the WordPress root folder). Compress them into a ZIP file and download it to your computer. Alternatively, use an FTP client to download the entire folder. Also, export your database: go to phpMyAdmin, select your WordPress database, click “Export,” choose “Quick” or “Custom” with gzip compression, and download the .sql file.
- Create a new database on DreamHost. Log into your DreamHost panel, go to “Manage Databases” (under “Goodies” or “Domains”), and create a new MySQL database. Note the database name, username, and password. You’ll need these later.
- Upload your WordPress files to DreamHost. In DreamHost’s panel, go to “Manage Files” (or use FTP). Navigate to the domain’s document root (usually
public_htmlor a subdirectory if you’re using a subdomain). Upload the ZIP file you downloaded and extract it there. If you used FTP, just upload the entire folder contents directly. - Edit wp-config.php to match the new database. Locate the
wp-config.phpfile in your uploaded WordPress folder. Open it in a text editor and replace the database name, username, and password with the new DreamHost credentials you created in step 2. Save the file. - Import your database into DreamHost. Go to DreamHost’s phpMyAdmin (found under “Manage Databases” → “phpMyAdmin” link). Select your new database, click “Import,” choose the .sql file you exported earlier, and run the import. If the file is too large, split it or use a tool like BigDump.
- Update the site URL in the database (if needed). If your domain name stays the same, skip this step. If you’re using a temporary URL or IP address, you’ll need to update the
siteurlandhomeoptions in thewp_optionstable. Use phpMyAdmin’s SQL tab to run:UPDATE wp_options SET option_value = 'http://your-temp-url' WHERE option_name IN ('siteurl', 'home');Replace with your actual temporary URL. - Point your domain to DreamHost. At your domain registrar, change the nameservers to DreamHost’s (usually
ns1.dreamhost.comandns2.dreamhost.com). If you’re only moving the site and keeping the domain elsewhere, update the A record to DreamHost’s IP address (found in your DreamHost panel under “Manage Domains”). DNS changes can take 24–48 hours to propagate. - Test your site. Once DNS propagates, visit your domain. Check that pages load, links work, and images appear. Log into your WordPress admin (go to
yourdomain.com/wp-admin) to confirm you can access the dashboard. - Update your WordPress settings. If you used a temporary URL, go to Settings → General in WordPress admin and update the site URL and home URL to your final domain. Save changes.
- Verify and clean up. After everything works, delete the ZIP file from the server and remove any backup files. Also, consider updating your permalinks (Settings → Permalinks → Save Changes) to refresh rewrite rules.
Common Mistakes
- Forgetting to export the database – only moving files results in a broken site.
- Not updating wp-config.php – the site cannot connect to the new database.
- Using the wrong database name or user – double-check credentials.
- Ignoring file permissions – WordPress files should be 644 and directories 755. Incorrect permissions can cause errors.
- Changing DNS before testing – if you test with a temporary URL, you can avoid downtime.
- Not backing up the old site – always have a fallback if something goes wrong.
Tips
- Use a maintenance mode plugin or a simple .maintenance file to keep visitors out during the final switch.
- Export the database with “Add DROP TABLE / VIEW / PROCEDURE / FUNCTION” checked to avoid conflicts on import.
- If your site is large, increase PHP memory limit and execution time in DreamHost’s panel or via .htaccess.
- Consider using a migration plugin like Duplicator or All-in-One WP Migration – they automate file and DB transfer, but you still need to create the database on DreamHost.
- Keep a copy of your old host’s files and database for at least a week after migration, in case you need to roll back.
Troubleshooting
Site shows “Error establishing a database connection.” This usually means wp-config.php has wrong database credentials or the database doesn’t exist. Double-check the database name, user, and password in DreamHost’s panel and update wp-config.php.
Pages load but styles and images are missing. This often happens when the site URL in the database is wrong. Run the SQL update from step 6 again, or use a plugin like “Better Search Replace” to update URLs.
White screen of death. This is usually a PHP error. Check the error log in DreamHost’s panel (under “Logs”). Common fixes: increase memory limit, disable plugins via FTP by renaming the plugins folder, or switch to a default theme.
Login redirects back to old site. If you’re using a temporary URL, clear your browser cache and cookies, and try accessing wp-admin directly. If the issue persists, update the site URL in the database again.
Emails not sending. DreamHost may block PHP mail() by default. Use an SMTP plugin and configure it with your email provider or DreamHost’s SMTP settings.
Frequently Asked Questions
How long does a WordPress migration to DreamHost take?
The actual file transfer and database import can take 30 minutes to a few hours, depending on site size and your internet speed. DNS propagation can take up to 48 hours, but the site will work once the new DNS resolves.
Do I need to change my domain nameservers?
If you want DreamHost to manage your DNS, yes. If you prefer to keep DNS at your registrar, you only need to update the A record to DreamHost’s IP. Both work.
Can I use a migration plugin instead of manual steps?
Yes. Plugins like Duplicator or All-in-One WP Migration can simplify the process. They still require you to create a database on DreamHost, but they handle file packaging and database import automatically.
Will my site be down during the migration?
If you follow the steps and use a temporary URL for testing, your old site remains live until you switch DNS. The actual downtime is minimal – only the time it takes for DNS to propagate.
What if my site is too large for phpMyAdmin import?
Use the command line via SSH (DreamHost provides SSH access) to import the database with mysql -u username -p database < backup.sql. Alternatively, split the SQL file into smaller parts.
Do I need to change my WordPress admin password after migration?
It’s a good security practice, but not mandatory. If you suspect your old host was compromised, change it.