Move WordPress to DreamHost
- 1 Overview
- 2 Migrating using the Duplicator plugin
- 3 Migrating all of your files manually
- 4 Testing your installation using a DreamHosters subdomain
- 5 Update DNS records
- 6 Checking for a successful installation
- 7 See also
The following covers the process of moving your WordPress site with your current host to DreamHost.
They also offer a Guided Transfer. Due to complications with the WordPress.com setup, if their official directions don't work properly, DreamHost strongly recommends you purchase the guided transfer.
|Note:||Before making any changes to your website, DreamHost highly recommends backing up your database. Instructions can be found on our wiki page:
But you may need to contact your current host for instructions on how to export in their system.
Migrating using the Duplicator plugin
Use the free Duplicator Plugin which packages up your WordPress install as well as the MySQL database on the "source" side.
The following steps walk you through the migration process.
- Install and open the Duplicator plugin.
- Click the Create New button.
- A page appears allowing you to name this backup and enter your database information:
- On this page, name this backup anything you like.
- Enter your current database credentials and name of the New URL you're going to copy this site into.
- On the bottom, click the Next button to proceed.
- The following screen appears:
- Click the Build button to create the backup.
- The download page appears.
- Click on both the Installer and Archive buttons to download the files.
- You will have downloaded a file named ‘installer.php’ and ‘backupname.zip’.
- Use our FTP wiki to upload the .zip and installer.php files to your new WordPress site.
- Go to to your MySQL Databases page at (Panel > ‘Goodies’ > ‘MySQL Databases).
- Create a new hostname and empty database for the site you’re migrating to.
- Once you create the database, visit the new URLs installer.php file. For example:
- On this page, enter your new database credentials and then click the Run Deployment button.
The former WordPress site is now duplicated into the new site URL.
- Your source and target systems need to have the ZipArchive PHP extension installed so that the Duplicator plugin can zip the package. You can check this by going to the System Compatibility page in the Duplicator plugin. On DreamHost, that means your site must be running PHP 5.3+. If your site isn't running at least php 5.3, you can easily change it if you edit the web hosting options of your domain from the (Panel > ‘Domains’ > Manage Domains’) page.
- Depending on the file size of your WordPress site and database, the plugin may experience problems with importing your content to DreamHost. If the file size is too large, PHP may time out while attempting to restore the backup that the plugin creates. If this is the case, you can try to increase your php memory settings using a phprc file using the following wiki:
Migrating all of your files manually
You are also able to manually migrate the entire site. In order to manually migrate your data, you'll need to:
- Backup your database as a .sql file from your previous host.
- Backup your web files via FTP from your previous host.
- Create a MySQL hostname and database at DreamHost for the new installation.
- Upload these files via FTP/SFTP/SSH to your DreamHost server.
- Import your database to your DreamHost database server.
- Update your wp-config.php file to point to your DreamHost database.
Step one – Backing up your database
Before you do anything else, back up your MySQL database at your current host. The method of creating a backup differs from host to host. The simplest method is to use phpMyAdmin, a web-based SQL manager available in many hosts' panels.
For further information, check with your current host on how to back up your database as a .sql file.
Step two – Backing up your web files via FTP
At your current host, back up all your web files via FTP/SFTP/SHELL. Visit our FTP wiki which explains how to do this with DreamHost:
You may need to contact your current host to confirm what settings to use to connect to their server.
Step three – Creating a hostname and database in your DreamHost panel
Once you have the backup files saved to your computer, make a new SQL hostname and a new, empty database for your WordPress installation in your DreamHost panel. You can create these on the (Panel > ‘Goodies’ > ‘MySQL Databases’) page.
|Tip:||If you create the hostname and the database's name, user, and password information the same as your old hostname and database, you can avoid editing your wp_config.php file in step#5 below.|
Step four – Transferring your WordPress installation
Transfer your WordPress files you’ve backed up to your new DreamHost account.
- Import your web files using our FTP wiki:
- Import your database using our Migrate_MySQL wiki:
|Note:||Assuming you created the database in your DreamHost panel with the same hostname, username, password and database name as was set up at your previous host, your site may already appear online. If not, proceed to step#5 below|
Step five – Editing wp_config.php
It's likely that the hostname, database, username and password that you created in your DreamHost panel differs from the one on your previous host. If that's the case you'll need to update your wp-config.php file to make sure that the information matches the login credentials for your new database in the DreamHost panel.
Open the wp-config.php file and you’ll see the following contents:
|Note:||Make sure that the table_prefix setting in wp-config.php matches your backup table prefix, otherwise WordPress will prompt you to install from scratch.|
To confirm the table prefix, use phpMyAdmin to log into the database at DreamHost you’ve just imported in Step#4 above.
- Once logged in, click your database name on the left. You'll see the tables appear underneath.
- The first part of the table is the prefix. In the above example, the prefix is wp_92tnyu_.
- Update your wp-config.php file's prefix field to match this table prefix.
Assuming your DNS is already pointed to DreamHost, your site will now resolve online. If your DNS is not pointed to DreamHost, view the section below on how to create a mirror site.
Testing your installation using a DreamHosters subdomain
View the following wiki for full instructions on how to view your WordPress site at DreamHost before you point your DNS:
When this is completed, you can then view your site at your dreamhosters.com subdomain. Also note that some of your images/links may still be hard-coded to the original URL for your site. To change these, you can use a search and replace the plugin. Below are a couple of plugins that will work:
Update DNS records
When you're finally ready to host your site on our servers, you can point your DNS to DreamHost by either updating your nameservers, or by creating A records.
Updating your nameservers to point to DreamHost
After you verified that everything is working on your DreamHost account, you'll need to point your domain name to DreamHost's nameservers. Note that you don't need to transfer your domain registration to DreamHost – you only need to reconfigure its nameservers to point to DreamHost. In order to do this, access your registrar, or the service provider with whom you registered your domain. If you're not sure who you registered with, you can often find that information by going to Whois.net and entering your domain name in the search field. Access your registrar's control panel (it might be the same as your webhost, but doesn't have to be), and change your domain's nameserver settings to:
- ns1.dreamhost.com 188.8.131.52
- ns2.dreamhost.com 184.108.40.206
- ns3.dreamhost.com 220.127.116.11
The change can take up to 3–72 hours to take effect, but often happens sooner than that.
Updating your A records to point to DreamHost
Alternatively, if you wish to keep your nameservers with your current DNS providerm you can set up DNS A records for the domain to point here to DreamHost. You will need to contact your current DNS provider to see how to set up A records on their end. You can view the DreamHost DNS zone records for your domain in your panel by going to (Panel > ‘Domains’ > ‘Manage Domains’).
- Click on the DNS link beneath the domain to view the DNS records.
- Use the IP address listed to the right of the www prefix for the domain.
- Create two A records at your current host using this IP:
- one for the www record, and
- one for the blank A record.
This way, your site will work with and without the www before the URL. Please note that the DNS A records will take several hours to update online after you’ve created them at your current host.
Checking for a successful installation
If you've done everything correctly, your domain will now resolve to your WordPress installation on your DreamHost account. If you need to check if the domain is pointing to the right server, upload a text file to your domain's root directory on your DreamHost server (but not your old server) and try to access that file via a web browser. If it's there, that means your domain is now pointing to the correct place.
Make sure that you on't make any edits on your WordPress installation during the 48-hour waiting period, since any changes that you make or any new content that you add will not carry over to your DreamHost account unless you retransfer the database as described above.
The easiest way to access your site's files during the transition period is by entering your servername as the hostname in your FTP/SFTP/SSH program. You can view the correct server name on the (Panel > ‘Billing & Account’ > ‘Manage Account’) page. For example if your server is named flower, the hostname you’d enter into your FTP client would be flower.dreamhost.com.