4

How to move WordPress to a different domain at DreamHost manually

 2 years ago
source link: https://help.dreamhost.com/hc/en-us/articles/214693138-How-to-move-WordPress-to-a-different-domain-at-DreamHost-manually
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to move WordPress to a different domain at DreamHost manually

Overview

DreamHost offers several methods to help move your WordPress installation to a new domain name. This article lists two methods to help you accomplish this.

These instructions can be used with any WordPress site, including One-Click installs. However, if you have a One-Click install, the DreamHost panel offers an easier way to move your site to a new domain. View the following article for more information:

Method 1 — DreamHost's Website Migration Service

DreamHost offers a variety of website migration services, including moving WordPress between domains. View the following article to view the different options available.

Method 2 — Manually moving your site

You can also manually move your site yourself. The following instructions describe how to move a WordPress installation between two domains hosted at DreamHost. The example domains used in these instructions are:

  • oldsite.example.com
    and
  • newsite.example.com

Step 1 — Back up your data

You should always backup your data before making any change to your site. View the following article for instructions on how to backup your web site files, database, and any email you wish to keep:

Step 2 — Add hosting for the new site

Add the new domain (newsite.example.com) to your panel. Make sure to set it as Fully Hosted:

Step 3 — Create a new database

Navigate to the MySQL Databases page and create a new MySQL hostname and empty database.

Step 4 — Transfer your WordPress installation

Transfer the WordPress files you’ve backed up in step one to your new domain. If you had email addresses on the old site (oldsite.example.com), make sure to create the same addresses on your new domain. You can then transfer those emails.

  1. Upload your web files using the following article:
  2. Upload your database using the Migrate MySQL article:
  3. Transfer email from your old domain:

Step 5 — Edit the new wp-config.php file

Log into your new site (newsite.example.com) via FTP or SSH and open the wp-config.php file (this is in your site's directory). You’ll see the following contents:

define('DB_NAME', ‘exampledatabase’);
define('DB_USER', 'exampledbuser');
define('DB_PASSWORD', ‘database password here’);
define('DB_HOST', 'mysql.example.com');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

$table_prefix = 'wp_2hdy121d_';

Update the following:

  • Database name
  • Database user
  • Database user password
  • Hostname
  • Replace the existing WordPress $table_prefix value with the imported $table_prefix value.

    Open the database file you previously downloaded in a text editor to view the correct prefix of each table. The example below shows what you will see. In this example, the table prefix is wp_mwpp89_.

    --
    -- Table structure for table `wp_mwpp89_comments`
    --

Step 6 — Update all URLs in the database

You must now update all URLs in the database since the database is using the old URL. View the following article for several options on how to accomplish this:

When you update all URLs, the HOME and SITE URL will also be updated.

At this point, your website should load normally on the new domain name.

Summary

Once the above steps are complete, the new site looks exactly the same as it once appeared on your old domain name.

Did this article answer your questions?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK