Home / Guides / WordPress

12 min read ยท Updated

Move a WordPress site to Dredge

Moving WordPress means copying two things: the files (your theme, plugins, and uploads) and the database (your posts, pages, and settings). Here are two ways to do it.

Try the plugin method first. Use the manual method if your site is large or the plugin struggles.

Not a WordPress site? Follow Move any website to Dredge instead.

Before you start

  • Don't cancel your old host yet. Keep it running until the site is live on Dredge and you've checked it for a few days.
  • Take a full backup on your old host, even if you think you won't need it.
  • Check the size of the site against your plan's storage on the pricing page.

Method 1: With a migration plugin

  1. Install a fresh WordPress on Dredge by following Install WordPress in one click.
  2. Export from the old site. On the old site's dashboard, go to Plugins → Add New, install All-in-One WP Migration, then open it and choose Export → File. Download the .wpress file it creates.
  3. Import on Dredge. Log in to the new WordPress on Dredge, install the same plugin, choose Import, and upload the file. Confirm that it will overwrite the fresh install.
  4. Log in again with your old site's username and password, since the import brought your users over. Then go to Settings → Permalinks and click Save twice to rebuild your links.

The free version of the plugin limits how big an import can be. If your export is over the limit, use Method 2 below rather than paying for an extension.

Method 2: By hand

  1. Download the files. On your old host, use its file manager or an FTP app such as FileZilla to download the whole WordPress folder, usually public_html. If the file manager can compress it to a .zip first, do that; it's much faster.
  2. Export the database. On the old host, open phpMyAdmin, select your WordPress database, click Export, leave it on “Quick” and “SQL”, and download the file. Not sure which database? Open wp-config.php and look for DB_NAME.
  3. Create a database on Dredge. In cPanel, open Database Wizard. Create a database, create a user with a strong password, and give that user All Privileges. Write down all three names and the password.
  4. Import the database. In cPanel, open phpMyAdmin, click your new database on the left, choose Import, and upload the .sql file.
  5. Upload the files. In cPanel, open File Manager, go to public_html (or your extra domain's folder), upload the .zip, then right-click it and choose Extract. Make sure wp-config.php ends up directly inside the folder, not in a subfolder.
  6. Point WordPress at the new database. Edit wp-config.php and update these three lines with what you wrote down in step 3:
    define( 'DB_NAME', 'youraccount_wpdb' );
    define( 'DB_USER', 'youraccount_wpuser' );
    define( 'DB_PASSWORD', 'the-password-you-chose' );
    Leave DB_HOST as localhost.

Preview it before you switch

Your domain still points at the old host at this point, which is good: visitors see nothing change while you check the copy. To look at the Dredge copy yourself, add a line to your computer's hosts file with your Dredge server's IP address (shown in cPanel under Server Information) followed by your domain, for example:

203.0.113.10  yourdomain.com www.yourdomain.com

On Windows the file is C:\Windows\System32\drivers\etc\hosts; on Mac and Linux it's /etc/hosts. Browse the site, log in, and click around. Remove the line when you're done.

Go live

  1. Change your domain's nameservers to Dredge, as in Connect a domain.
  2. Once the change has spread and AutoSSL has issued your certificate, check that the site loads over https:// and that images, forms, and logins work.
  3. If the domain name itself changed during the move, install the Better Search Replace plugin and replace the old address with the new one across all tables.
  4. Give it a few days, take one last backup from the old host, and then cancel it.

Stuck partway through? Email support@dredgehost.com with your domain and where you got to. The people who run the servers will pick it up.

← All guides

Stuck on a step? Email support@dredgehost.com and we'll help you sort it out.

Did this guide help? A short review on Trustpilot helps other people find a small host they can trust.