How to Migrate a WordPress Site to Bluehost
In this article
Migrating a WordPress site to Bluehost means moving your website’s files, database, and settings to Bluehost’s servers. This guide walks you through the entire process—from backing up your current site to launching it on Bluehost—so you can switch hosts without losing content or breaking functionality. You’ll need your existing site’s login details, your Bluehost account credentials, and access to both hosting panels.
What You'll Need
- Access to your current WordPress admin dashboard (wp-admin).
- Your current hosting control panel (cPanel, Plesk, or custom) login.
- Bluehost account login (you should have already purchased a hosting plan).
- An FTP client like FileZilla (optional but helpful).
- A temporary domain or a domain you plan to use with Bluehost (you can also use a temporary Bluehost domain).
Step-by-Step
- Back up your existing WordPress site. In your current WordPress admin, install a backup plugin like UpdraftPlus or Duplicator. Use it to create a full backup of your files and database. Download the backup archive to your computer. Alternatively, use your current host’s backup tool if available.
- Set up Bluehost hosting. Log in to your Bluehost account. If you haven’t already, go to “My Sites” and click “Create Site” or “Install WordPress.” Follow the prompts to install WordPress on a temporary domain (like a temporary Bluehost subdomain) or your primary domain if you’re moving it. Note the WordPress admin URL and credentials you create.
- Access Bluehost’s file manager. In Bluehost’s control panel, find “File Manager” under the “Files” section. Navigate to the public_html folder (or the folder where your new WordPress is installed).
- Upload your backed-up files. Extract your backup archive on your computer if it’s not already extracted. Then, using File Manager or an FTP client, upload all the extracted files (including wp-admin, wp-content, wp-includes, and root files like .htaccess) into the public_html folder. Overwrite any existing files when prompted.
- Export your database from the old host. Log in to your old hosting control panel (e.g., cPanel) and open phpMyAdmin. Select your WordPress database (usually named something like “youruser_wpdb”). Click “Export” and choose “Quick” or “Custom” – select “SQL” format. Download the .sql file.
- Import the database to Bluehost. In Bluehost’s cPanel, open phpMyAdmin. Select the database you created during the Bluehost WordPress installation. Click “Import,” choose the .sql file you downloaded, and click “Go.” Wait for the import to finish.
- Update wp-config.php with new database details. In Bluehost’s File Manager, find wp-config.php in public_html. Right-click and edit. Replace the database name, username, password, and host with the ones from your Bluehost database (you can find these in Bluehost’s MySQL Databases section). Save the file.
- Update the site URL in the database. If your domain is changing (e.g., from olddomain.com to newdomain.com), you need to update the URLs in the database. In phpMyAdmin, go to your Bluehost database, click on the wp_options table, and find “siteurl” and “home.” Edit them to your new domain (or keep the same if the domain didn’t change). Also, use a search-replace tool (like the Better Search Replace plugin) to update any hardcoded URLs in posts and content.
- Test your site on Bluehost. Visit your domain (or temporary Bluehost domain) and check key pages, images, and functionality. Log in to wp-admin to ensure it works. If you see errors, refer to the troubleshooting section below.
- Point your domain to Bluehost. If you’re using a custom domain, update its nameservers to Bluehost’s (typically ns1.bluehost.com and ns2.bluehost.com). This is done at your domain registrar. DNS changes can take up to 24-48 hours to propagate.
- Finalize and clean up. Once the domain resolves, you can cancel your old hosting account. Before canceling, double-check that everything works and that you have a copy of your backup.
Common Mistakes
- Forgetting to update wp-config.php: If you skip this, your site will show a database connection error.
- Not updating the site URL: If you change domains and don’t update the database, your site will redirect to the old domain.
- Uploading files to the wrong folder: Make sure you upload to public_html, not a subfolder unless you intend to run WordPress in a subdirectory.
- Importing the database to the wrong database: Ensure you select the correct database in phpMyAdmin before importing.
- Skipping a full backup: Always have a backup before migrating; you might need to restore if something goes wrong.
Tips
- Use a migration plugin: Plugins like All-in-One WP Migration or Duplicator can automate most of the file and database transfer, reducing manual steps.
- Keep your site in maintenance mode: During migration, put your old site in maintenance mode (using a plugin) to prevent users from making changes that won’t be included in the backup.
- Test on a staging site first: If possible, test the migrated site on a temporary URL before switching DNS.
- Check for mixed content: If your site uses HTTPS, ensure all URLs in the database are updated to https:// to avoid security warnings.
- Clear your browser cache: After migration, clear your cache to see the updated site.
Troubleshooting
- Database connection error: This usually means wp-config.php has incorrect database details. Double-check the database name, username, password, and host (often “localhost” on Bluehost).
- 404 errors on pages: This often happens if permalinks aren’t refreshed. Go to Settings > Permalinks in wp-admin and click “Save Changes” to flush rewrite rules.
- White screen of death: This can be caused by a corrupted theme or plugin. Access your files via File Manager and temporarily rename the wp-content/plugins folder to plugins_old to disable all plugins. If the site loads, reactivate plugins one by one to find the culprit.
- Images not loading: If images are broken, the URLs in the database might still point to the old domain. Run a search-replace tool to update the domain in the database.
- Login redirects to old site: Ensure the siteurl and home values in wp_options are correct. Also, clear your browser cache and cookies.
- Site shows “Error establishing a database connection” after import: The import might have failed. Re-import the database, ensuring the file is not corrupted and you have enough PHP memory (increase memory limit if needed).
Frequently Asked Questions
Do I need to buy a new domain for Bluehost?
No, you can use your existing domain. Just update the nameservers to point to Bluehost.
Will my site be down during migration?
There may be brief downtime when you switch DNS, but you can minimize it by keeping your old site live until the new one is ready.
Can I migrate without cPanel access to my old host?
Yes, you can use a WordPress plugin to export the site, or manually download files via FTP and export the database via phpMyAdmin if available.
How long does the migration take?
It depends on the size of your site and your internet speed. File transfer and database import can take from minutes to a few hours. DNS propagation can take up to 48 hours.
What if my site uses a custom domain with SSL?
Bluehost offers free SSL certificates. After migration, enable SSL in Bluehost and ensure your site URLs use https://.
Do I need to change my WordPress admin password after migration?
It’s a good security practice to reset your password after migration, especially if you used the same credentials during the process.